Jump to content
UBot Underground

jQuery in UI HTML Panel not working?


Recommended Posts

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

 

Link to post
Share on other sites

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>

  • Like 4
Link to post
Share on other sites

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

Link to post
Share on other sites

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

Link to post
Share on other sites

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

Yes, it worked for me but I had to put all my javascript between the closing body and html tags :)

Link to post
Share on other sites
  • 4 years later...

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

  • Like 1
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...