One script used by many certain component

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

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

One script used by many certain component

#1

Postby t4nu » Wed Dec 16, 2015 10:00 pm

Hi,
First sorry if the subject is little confusing.
Here is what I want to know:
Let say that in 1 page I have several buttons and each button connect to one script, question: in the script is it possible to determined which button that call it? If so how to do it?
Thanks in advance for the help.
0 x

kotinkarwak
Ebase User
Posts: 109
Joined: Mon Sep 21, 2015 9:55 pm

#2

Postby kotinkarwak » Wed Dec 16, 2015 10:27 pm

I use this construct

if(event.getOwner().elementName == "login_system"){
...
} else if(event.getOwner().elementName == "register_system"){
...
}...

In example, login_system and register_system are the control names.

All will hence point to the file with above code script file.
0 x
ebasetech v5

Skype: mateso08
Location: Kenya

t4nu
Ebase User
Posts: 305
Joined: Thu Jul 02, 2015 8:32 am
Location: Indonesia

One script used by many certain component [SOLVED]

#3

Postby t4nu » Wed Dec 16, 2015 10:39 pm

Hi kotinkarwak,
Thanks a lot for the help. It solved my problem :D
kotinkarwak wrote:I use this construct

if(event.getOwner().elementName == "login_system"){
...
} else if(event.getOwner().elementName == "register_system"){
...
}...

In example, login_system and register_system are the control names.

All will hence point to the file with above code script file.
0 x


Who is online

Users browsing this forum: No registered users and 21 guests