Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Global Method

Avatar

Avatar
Level 2
SriRamuSr
Level 2

Likes

0 likes

Total Posts

14 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
SriRamuSr
Level 2

Likes

0 likes

Total Posts

14 posts

Correct Reply

0 solutions
View profile
SriRamuSr
Level 2

07-08-2008

I need to do similar functionality for 2 or more Controls

For eg.,

I have 3 Text Box. On Exit of these 3 Text Box, I need to display same Message.



Can I write a Global Scripting Function and call it in all the 3 Text Boxes?



if so, Can you please explain the same...

Replies

Avatar

Avatar
Level 2
_Edgar_van_Waar
Level 2

Likes

0 likes

Total Posts

32 posts

Correct Reply

0 solutions
View profile

Avatar
Level 2
_Edgar_van_Waar
Level 2

Likes

0 likes

Total Posts

32 posts

Correct Reply

0 solutions
View profile
_Edgar_van_Waar
Level 2

07-08-2008

You can create a new Script Object at form-level. (Right click on the form and select "Insert Script Object")

Next give the new object a proper name (e.g. GlobalFunctions)

In the Script Object you can enter your scripts like you are used to do within control-event (unless you are using FormCalc as script-language, because script objects only allows JavaScript). However it is now a function instead of a event, so you need to make a function of it. E.g:



function DoSomething(SomeParameter) {

return "I have done something";

}



Now you can call it from any control by using the script objects name and the function you would like to call. E.g.:



GlobalFunctions.DoSomething("blabla");