andymurray 2 Posted May 23, 2013 Report Share Posted May 23, 2013 Hi, I found a thread on how to call my 'js' and 'css' for the Ui html panelI use in my bot. I've downloaded the examples and altered the codeto fit. However it doesn't seem to work and I can't figure out why. Probablysomething simple I've missed again. I put the following at the top of my bot: on load("Bot Loaded") { set(#Javascript, "my script is in here", "Global") set(#CSS, "my script is in here", "Global") And this in my UI HTML Panel: ui html panel("<html><head><title></title><script type=\'text/javascript\' charset=\'utf-8\'>{#Javascript}</script><style type=\"text/css\">{#CSS}</style></head> What have I done wrong? Thanks,Andy Quote Link to post Share on other sites
HelloInsomnia 1103 Posted May 23, 2013 Report Share Posted May 23, 2013 Since the ui html panel runs on bot load then you can just put your css there - you don't need to add it in to the bot loaded node. I have also added in the jquery library in there before so I'm sure you can put javascript in there as well. Can you provide an example script? Quote Link to post Share on other sites
andymurray 2 Posted May 23, 2013 Author Report Share Posted May 23, 2013 Hi Hellolnsomnia, Yeah, I originally had it all within the UI HTML Window, but theinterface for the bot is very sluggish and unresponsive aftera few minutes. So I decided to find another way. The example script I used was from this thread:http://www.ubotstudio.com/forum/index.php?/topic/10252-how-to-include-css-and-js-files-in-ui-html-box/?pid=52891&do=findComment&comment=52891 This works great. Thanks,Andy Quote Link to post Share on other sites
andymurray 2 Posted May 23, 2013 Author Report Share Posted May 23, 2013 DOH!!! When I compiled it the darn thing worked Had me stumped because the example script I showedyou actually worked when I loaded it into Ubot, but minedidn't. So I figured I'd done something wrong. Sorry for wasting your time mate. Thanks,Andy 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.