anis 0 Posted September 3, 2013 Report Share Posted September 3, 2013 when I put the word in a variable checkbox, checkbox did not check there is a problem with the word variable. anyone have a solution please?my script is :ui html panel("<!DOCTYPE html> <html><head> <title>Page Title</title> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"> <link rel=\"stylesheet\" href=\"http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css\" /> <script src=\"http://code.jquery.com/jquery-1.9.1.min.js\"></script> <script src=\"http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js\"></script></head><body><div data-role=\"name2\" id=\"toto\"><fieldset data-role=\"controlgroup\" data-type=\"horizontal\" data-mini=\"true\"> <legend>Taille de l\'entreprise</legend><input name=\"TailleEntreprise1\" id=\"TailleEntreprise1\" type=\"checkbox\" variable=\"#myvar15\" fillwith=\"checked\"><label for=\"TailleEntreprise1\" checked>No choice</label><input name=\"TailleEntreprise2\" id=\"TailleEntreprise2\" type=\"checkbox\"><label for=\"TailleEntreprise2\" checked>1-10</label></fieldset></div></body></html> Quote Link to post Share on other sites
UBotDev 276 Posted September 3, 2013 Report Share Posted September 3, 2013 First, try to move script parts bellow last div/before </body> tag. Also, do you need both versions of JQuery loaded? Quote Link to post Share on other sites
anis 0 Posted September 3, 2013 Author Report Share Posted September 3, 2013 thanks for your response i need both versions of jquery loaded. when i try to move script parts bellow last div/before </body> tag.it's the same thing. the full code is :ui html panel("<html><head> <title>Page Title</title> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"> <link rel=\"stylesheet\" href=\"http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css\" /> <script src=\"http://code.jquery.com/jquery-1.9.1.min.js\"></script> <script src=\"http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js\"></script></head><body><div data-role=\"name2\" id=\"toto\"><fieldset data-role=\"controlgroup\" data-type=\"horizontal\" data-mini=\"true\"> <legend>Taille de l\'entreprise</legend><input name=\"TailleEntreprise1\" id=\"TailleEntreprise1\" type=\"checkbox\" variable=\"#myvar15\" fillwith=\"checked\"><label for=\"TailleEntreprise1\" checked>No choice</label><input name=\"TailleEntreprise2\" id=\"TailleEntreprise2\" type=\"checkbox\"><label for=\"TailleEntreprise2\" checked>1-10</label></fieldset></div></body></html>", 400)i have the same problems when i want to check this checkbox i have nothing (sorry for my english). Quote Link to post Share on other sites
UBotDev 276 Posted September 3, 2013 Report Share Posted September 3, 2013 Well you didn't move scripts bellow. Try this: ui html panel("<html> <head> <title>Page Title</title> <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"> <link rel=\"stylesheet\" href=\"http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css\" /> </head> <body> <div data-role=\"name2\" id=\"toto\"> <fieldset data-role=\"controlgroup\" data-type=\"horizontal\" data-mini=\"true\"> <legend>Taille de l\'entreprise</legend> <input name=\"TailleEntreprise1\" id=\"TailleEntreprise1\" type=\"checkbox\" variable=\"#myvar15\" fillwith=\"checked\"> <label for=\"TailleEntreprise1\" checked>No choice</label> <input name=\"TailleEntreprise2\" id=\"TailleEntreprise2\" type=\"checkbox\"> <label for=\"TailleEntreprise2\" checked>1-10</label> </fieldset> </div> <script src=\"http://code.jquery.com/jquery-1.9.1.min.js\"></script> <script src=\"http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js\"></script> </body> </html>", 400) Quote Link to post Share on other sites
anis 0 Posted September 3, 2013 Author Report Share Posted September 3, 2013 I want to thank you for your help. even when I did as you said, the error is always the same. the checkbox does not want to check Quote Link to post Share on other sites
UBotDev 276 Posted September 3, 2013 Report Share Posted September 3, 2013 Works here: http://screencast.com/t/AjT2ARMvX Make sure you have .NET Framework installed. Quote Link to post Share on other sites
anis 0 Posted September 3, 2013 Author Report Share Posted September 3, 2013 thanks in your code you have problems with links of jquery and css :<link rel=\"stylesheet\" href=\"http://code.jquery.c...-1.3.2.min.css\" /><script src=\"http://code.jquery.c...y-1.9.1.min.js\"></script><script src=\"http://code.jquery.c...e-1.3.2.min.js\"></script>try with the complete links and you see my problem :http: // code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.csshttp: //code.jquery.com/jquery-1.9.1.min.jshttp: //code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js%5C Quote Link to post Share on other sites
anis 0 Posted September 3, 2013 Author Report Share Posted September 3, 2013 sorry for the last linkhttp: //code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js Quote Link to post Share on other sites
anis 0 Posted September 3, 2013 Author Report Share Posted September 3, 2013 the problem is only in ui html panel. when i put the same code in load html it's good Quote Link to post Share on other sites
UBotDev 276 Posted September 3, 2013 Report Share Posted September 3, 2013 thanks in your code you have problems with links of jquery and css :<link rel=\"stylesheet\" href=\"http://code.jquery.c...-1.3.2.min.css\" /><script src=\"http://code.jquery.c...y-1.9.1.min.js\"></script><script src=\"http://code.jquery.c...e-1.3.2.min.js\"></script>try with the complete links and you see my problem :http: // code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.csshttp: //code.jquery.com/jquery-1.9.1.min.jshttp: //code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js%5CSorry, I didn't notice that, I just copy pasted your code....next time please put code inside CODE element on the forum, so that links don't get shortened and we can copy paste them/code. However, I updated the code above so it uses the right URLs and UI still works here....http://screencast.com/t/YIjLBrpWeP Quote Link to post Share on other sites
anis 0 Posted September 3, 2013 Author Report Share Posted September 3, 2013 sorry for my later response my files ubot it's here : http://www.screencast.com/t/xNmqPIj3s ..sorry when i paste link you have space between http: and // and for this we dont have the same thingshttp: // code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css, it's my fault sorry and thanks a lot for your help Quote Link to post Share on other sites
UBotDev 276 Posted September 3, 2013 Report Share Posted September 3, 2013 I was finally able to re-create problems you are having there, and I don't think this looks promising. It looks like UBot variable is frozen at initial value and variable won't get updated once the user clicks the "checkbox" (also UI will force rendering of initial state). Usually such problems are solved by moving script at the bottom of the UI HTML, but in this case it looks like JQuery messes up with UBot code for UI, so I don't think easy solution exists for this. Quote Link to post Share on other sites
anis 0 Posted September 4, 2013 Author Report Share Posted September 4, 2013 thanks lot for your ask. if i understand is a problem with ui html panel in ubot. Quote Link to post Share on other sites
UBotDev 276 Posted September 4, 2013 Report Share Posted September 4, 2013 Yes, I think you will have hard time implementing that. 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.