esthonwood 0 Posted May 30, 2013 Report Share Posted May 30, 2013 Hi there, I created a whole HTML page with jQuery using my NetBeans editor and it works perfectly when I tested it on Chrome. When I copied and pasted it to the UI HTML panel and compiled it, however, it didn't work. The checkboxes wouldn't be checked, and the textboxes gets cleared right after the focus left. Is there a workaround for this? Here's my UI HTML Panel: ui html panel("<!DOCTYPE html><html> <head> <title>Tumblr Bot</title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"> <script src=\"http://code.jquery.com/jquery-1.10.0.min.js\"></script> <!--<script src=\"http://code.jquery.com/jquery-migrate-1.2.1.min.js\"></script>--> <style> body \{ background-color: #025076; color: white; font-family: Georgia, Helvetica, sans-serif; \} .image-header \{ float: left; padding-right: 15px; \} .error \{ color: red; text-align: center; \} </style> <script> $(function() \{ $(\'.proxy-selection\').hide(); $(\'.account-selection\').hide(); \}); function showProxySelection() \{ $(\'.proxy-selection\').toggle(); \} function showAccountFileSelection() \{ $(\'.account-selection\').toggle(); $(\'.single-account\').toggle(); \} </script> </head> <body> <table> <tr> <td colspan=\"2\"> <div class=\"image-header\"><img src=\"http://fc05.deviantart.net/fs71/i/2013/087/6/3/tumblr_icon_by_slamiticon-d5z7n1k.png\" width=\"120px\"/></div> <div class=\"image-header\"><h1>Bot</h1></div> </td> </tr> <tr> <td colspan=\"2\"><hr/></td> </tr> <tr> <td colspan=\"2\"> <div variable=\"#error\" fillwith=\"innertext\" class=\"error\"></div> </td> </tr> <tr> <td colspan=\"2\"><input type=\"checkbox\" variable=\"#use proxy file\" fillwith=\"checked\" onclick=\"showProxySelection()\"/> Use proxy list file</td> </tr> <tr class=\"proxy-selection\"> <td valign=\"top\">Proxy list:</td> <td valign=\"top\"><input type=\"file\" variable=\"#proxy list file\" fillwith=\"value\"/> </td> </tr> <tr class=\"proxy-selection\"> <td> </td> <td> <span>Important!</span><br/> * One proxy per line<br/> * Proxy format: IP ADDRESS:PORT:USERNAME:PASSWORD </td> </tr> <tr><td> </td></tr> <tr> <td colspan=\"2\"><input type=\"checkbox\" variable=\"#use account file\" fillwith=\"checked\" onclick=\"showAccountFileSelection()\"/> Use account list file</td> </tr> <tr class=\"account-selection\"> <td valign=\"top\">Account list:</td> <td valign=\"top\"><input type=\"file\" variable=\"#account list file\" fillwith=\"value\"/> </td> </tr> <tr class=\"account-selection\"> <td> </td> <td> <span>Important!</span><br/> * One account per line<br/> * Account Format: E-MAIL|PASSWORD|TAG </td> </tr> <tr class=\"single-account\"> <td>E-mail:</td> <td><input type=\"text\" id=\"email\" variable=\"#email\" fillwith=\"value\"></td> </tr> <tr class=\"single-account\"> <td>Password:</td> <td><input type=\"password\" id=\"password\" variable=\"#password\" fillwith=\"value\"></td> </tr> <tr class=\"single-account\"> <td>Search Tag:</td> <td><input type=\"text\" id=\"tag\" variable=\"#tag\" fillwith=\"value\"></td> </tr> <tr><td> </td></tr> <tr> <td>Follow limit:</td> <td><input type=\"text\" variable=\"#follow limit\" fillwith=\"value\" /></td> </tr> <tr> <td>Follow interval (seconds):</td> <td><input type=\"text\" variable=\"#follow interval\" fillwith=\"value\" /></td> </tr> <!-- <tr> <td valign=\"top\">Scrolls to bottom:</td> <td> <input type=\"text\" variable=\"#scroll limit\" fillwith=\"value\" /><br/> Note: Tumblr has endless scrolling. <br/> Enter how many times the bot will scroll to page bottom. </td> </tr>--> <tr><td> </td></tr> <tr> <td colspan=\"2\">Status: <span variable=\"#status\" fillwith=\"innertext\"></span></td> </tr> </table> </body></html>", 450) Thanks Quote Link to post Share on other sites
darryl561 177 Posted May 30, 2013 Report Share Posted May 30, 2013 Put the code that calls the jquery files between the closing body and html tags: </body> <script src=\"http://code.jquery.c...-1.10.0.min.js\"></script> <!--<script src=\"http://code.jquery.c...e-1.2.1.min.js\"></script>--></html> 4 Quote Link to post Share on other sites
esthonwood 0 Posted May 31, 2013 Author Report Share Posted May 31, 2013 Put the code that calls the jquery files between the closing body and html tags: </body> <script src=\"http://code.jquery.c...-1.10.0.min.js\"></script> <!--<script src=\"http://code.jquery.c...e-1.2.1.min.js\"></script>--></html> Perfect! Thanks a lot, darryl561 Quote Link to post Share on other sites
newcoder 5 Posted June 6, 2013 Report Share Posted June 6, 2013 did it worked for you my friend. because i am having same trouble. the html ui can work on web browsers but not in ubot and complied .exe hmm even i imported jquery and js proper way Quote Link to post Share on other sites
esthonwood 0 Posted June 6, 2013 Author Report Share Posted June 6, 2013 did it worked for you my friend. because i am having same trouble. the html ui can work on web browsers but not in ubot and complied .exe hmm even i imported jquery and js proper wayYes, it worked for me but I had to put all my javascript between the closing body and html tags Quote Link to post Share on other sites
newcoder 5 Posted June 6, 2013 Report Share Posted June 6, 2013 so did you put the javascript </body> <!---code ---> </html> ?does that worked ? for me some reason it is not ;( Quote Link to post Share on other sites
newcoder 5 Posted June 6, 2013 Report Share Posted June 6, 2013 ok i guess it worked fixed something thanks Quote Link to post Share on other sites
PRO 69 Posted June 21, 2017 Report Share Posted June 21, 2017 Put the code that calls the jquery files between the closing body and html tags: </body> <script src=\"http://code.jquery.c...-1.10.0.min.js\"></script> <!--<script src=\"http://code.jquery.c...e-1.2.1.min.js\"></script>--></html> UNBELIEVABLE! This resolves a whole mount everest of strange bugs (compiled bots behaving differently than in UBot itself). Most JavaScript in UI HTML Panel will cause major headaches without using this unconventional work around. Holy Cow.. now all the JS really works inside the Panel as expected. Many thanks for sharing this info @darryl561 1 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.