How can you set the "on select" for a combo box on a page via a script?, I assume it can be done with a custom action but what's the parameters for the pages and "on select/click"?
Professional Software Development Tools
How can you set the "on select" for a combo box on a page via a script?, I assume it can be done with a custom action but what's the parameters for the pages and "on select/click"?
Hey Mick,
Looks like you're hogging the forum...
Set your variable values (your script) on the page. Remember that variable assignments are, by default, global, so their values will carry forward to your ComboBox as well.
On the On Select, call the variable as part of the action.
Cheers,
MadDogDean
how do I set the script as a variable?
there is this for the page;
Application.SetPageScript("Page1", "On Show", "");
but it clears the existing script and doesn't work for the combobox...............
What are you trying to achieve?
You can look to set up your "script" as a function on the Globals page. Providing you never re-assign the variables used in the function, these variables will always have the same values regardless of where/when they are called.
By using dynamic variables that change, depending on your actions, your functions become live parts of your app.
Have a look through some of the posted .apz on the Forum and check out the code inside. You'll soon start to understand the "how" and "what" and it'll become clearer.
Cheers,
MadDogDean
yeh I've looked around and got all the combobox plugins but none offer a feature to add a script to the "on select" and thats quite bizarre given you can populate a compbbox from text.database/folders but cant populate the "on select", If you just load a scrip in the "onselect" or call a script from the "onselect" it does not interact with the rest of the page for example you populate the combobox and select an item then the rtf gets populated with information but if you load the same script that populates the rtf it does not work, all I really want to do is set the "onselect" script of page 2 combobox1 at runtime from a .lua script......................
I'm trying to figure out a function but in the absence of page and combobox and onselect codes its hard
never mind, there is after all a function built in for this..............![]()