Jump to content
UBot Underground

Passing Multiple Paramters From UI HTML


Recommended Posts

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

Link to post
Share on other sites

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. :)

Link to post
Share on other sites

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.

Link to post
Share on other sites
  • 2 weeks later...

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!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...