acamso 55 Posted August 23, 2014 Report Share Posted August 23, 2014 I was wondering if anyone knows how pass multiple parameters from the UI HTML panel. onClick="ubot.runScript('MyDefine(#file1,#file2)')" Just took a guess and threw a "," in there.. acamso Quote Link to post Share on other sites
LazyBotter 188 Posted August 23, 2014 Report Share Posted August 23, 2014 It is not possible, but i wish it was!! Quote Link to post Share on other sites
acamso 55 Posted August 23, 2014 Author Report Share Posted August 23, 2014 well..that's a bummer Quote Link to post Share on other sites
UBotDev 276 Posted August 23, 2014 Report Share Posted August 23, 2014 You should be using quotes around parameters, as described here: Here is an example: set(#var1, "Test string 1 from html!", "Global") set(#var2, "Test string 2 from html!", "Global") ui html panel("<input type=\"button\" value=\"button\" onclick=\"ubot.runScript(\'loadMain("{#var1}" , "{#var2}")\')\">", "") define loadMain(#test, #test2) { alert(#test) alert(#test2) } LazyBotter, next time you should do some research before misleading yourself and others. Quote Link to post Share on other sites
acamso 55 Posted August 24, 2014 Author Report Share Posted August 24, 2014 You should be using quotes around parameters, as described here: Here is an example: set(#var1, "Test string 1 from html!", "Global") set(#var2, "Test string 2 from html!", "Global") ui html panel("<input type=\"button\" value=\"button\" onclick=\"ubot.runScript(\'loadMain("{#var1}" , "{#var2}")\')\">", "") define loadMain(#test, #test2) { alert(#test) alert(#test2) } LazyBotter, next time you should do some research before misleading yourself and others. Thanks - I was aware of the quote strategy, but thought it only applied to strings. I will give this a try. Quote Link to post Share on other sites
acamso 55 Posted September 5, 2014 Author Report Share Posted September 5, 2014 You should be using quotes around parameters, as described here: Here is an example: set(#var1, "Test string 1 from html!", "Global") set(#var2, "Test string 2 from html!", "Global") ui html panel("<input type=\"button\" value=\"button\" onclick=\"ubot.runScript(\'loadMain("{#var1}" , "{#var2}")\')\">", "") define loadMain(#test, #test2) { alert(#test) alert(#test2) } LazyBotter, next time you should do some research before misleading yourself and others. I tried this but it resulted in blank alerts.. EDIT: Nvm, got it.. thanks! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.