Frank 177 Posted January 9, 2013 Report Share Posted January 9, 2013 I'm trying to figure out how to pass a ubot variable in javascript? Here's some code... ui text box("URL to nav too", #url) load html("<a href=\"javascript;\" onclick=\"ubot.runScript('google({#url})');\">Google</a>") define google(#url_local) { shell("cmd.exe /C \"start {#url_local}\"") } stop script google(#url) This just doesn't seem to work properly. Thanks, Frank 1 Quote Link to post Share on other sites
Eddie Waller 158 Posted January 9, 2013 Report Share Posted January 9, 2013 Try this ui text box("URL to nav too", #url) load html("<a href=\"javascript:;\" onclick=\"ubot.runScript(\'google("{#url}")\');\">Google</a>") define google(#url_local) { shell("cmd.exe /C \"start {#url_local}\"") } stop script google(#url) 1 Quote Link to post Share on other sites
Frank 177 Posted January 9, 2013 Author Report Share Posted January 9, 2013 Eddie you rock. I knew it had to be something simple, lol. 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.