Determining calling action

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Simon
Ebase User
Posts: 25
Joined: Thu Aug 27, 2009 9:43 am
Location: Hampshire County Council
Contact:

Determining calling action

#1

Postby Simon » Thu Sep 24, 2009 8:12 am

Hello all

I am writing an FPL script, which I intend to attach to the "On Click" action of numerous buttons. Is there a way to send the name of the calling button to the script, so the script knows which button was clicked? Or do I have to create a separate script for each button?

Thanks a lot for your help.

Simon
0 x

AJDulk
Ebase User
Posts: 94
Joined: Fri Sep 14, 2007 12:18 pm
Location: The Netherlands
Contact:

Re: Determining calling action

#2

Postby AJDulk » Thu Sep 24, 2009 9:29 am

To date I have always created seperate scripts for each "On Click" event or if I use the same field name in various forms with the same functionality I create a specific field name script.

I do not know of any currently supported way of retrieving the name of the button clicked, if it is currenly possible then I would love to know it as it would help with code re-use.

It may be possible with a custom Java Function using an undocumented API feature of Ebase but I am not sure if Ebase would be happy with you doing it or be willing to supply the info or function. You can always ask them though.
0 x

Simon
Ebase User
Posts: 25
Joined: Thu Aug 27, 2009 9:43 am
Location: Hampshire County Council
Contact:

#3

Postby Simon » Thu Sep 24, 2009 9:46 am

Thanks AJ, I thought that might be the case.
0 x

Simon
Ebase User
Posts: 25
Joined: Thu Aug 27, 2009 9:43 am
Location: Hampshire County Council
Contact:

#4

Postby Simon » Tue Sep 29, 2009 10:55 am

While I reading through the Ebase help documentation today, I accidentally happened upon a custom function that solves this problem. It is called getactionfield.
0 x


Who is online

Users browsing this forum: No registered users and 129 guests