Adgmedia 0 Posted April 23, 2014 Report Share Posted April 23, 2014 Hey guys, So I'm trying to basically run a bot where I can whip up a quick jquery code to make my code super adaptable by offering the capability of having the jquery code be loaded up at runtime - with a ui block text... But one thing I can't figure out right now is how to: 1- put ubot variables into that text and2- have ubot evaluate that code before actually running the javascript So that when the javascript code runs it can actually pick up values from ubot variables. Thanks to whoever can help out, I've been trying to crack this nut for a bit and maybe some of you have already figured it out - or it's really simple and I've just had too much caffeine Thanks once again,Bob Quote Link to post Share on other sites
Adgmedia 0 Posted April 23, 2014 Author Report Share Posted April 23, 2014 Here's basically what I have so far: I'm running the bot to load jQuery thenI'm running a javascript with the contents of the #jscode variable (which is set on the UI) Here's the code I want to run: jQuery('body').append('{#name}'); Right now, it appends {#name} to the body but I want it toappend the contents of the #name variable. Is there a commandto do this? Thanks,Bob Quote Link to post Share on other sites
UBotDev 276 Posted April 24, 2014 Report Share Posted April 24, 2014 You can't read UBot variable directly from HTML, you need to use a hidden field that uses the variable, then you read the actual value via JQuery.val(). 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.