cүвεя_נυηкιε 68 Posted October 20, 2016 Report Share Posted October 20, 2016 Hey there fellow UBotters, .. Im having a crisis and hoping that someone can shed some light on something for me What i am trying to do is so simple its annoying, .. I have a listbox in a UI HTML "Panel" which Im trying to make "Multi selection", now i am painfully aware that only 1 value can/will be passed via the UBot variable set within the listbox code, and indeed using javascript, a browser and "console.log()" have it exactly how i want it, .. perfect right ? ... NOPE I didnt think it would initially be a problem as i have used exactly the same process to extract/pass variables from within a Load HTML 1001 times ... However using a UI HTML "Panel" I can NOT seem to get the javascript var to pass over to a UBot var, .. here's what i got ..... The code im using to set the javascript variable :http://i.imgur.com/61J3zHK.jpg Here is the code working in a browser showing the multi-selection working great in the console.log :https://youtu.be/TLEQGuUGvFw And here is the UBot variable/set that will work in Load HTML but not UI HTML Panel : set(#MReady,$eval("MSel"),"Global")Ive also used this in Load HTML but no success in UI Panel : set(#MReady,$eval("document.getElementById('addimager998816').options[addimager998816.selectedIndex].value;"),"Global")Am i missing something ? ... something necessary for it to work in a UI "Panel" ? Any help or a point in the right direction would be greatly appreciated CheersCJ Quote Link to post Share on other sites
deliter 203 Posted October 20, 2016 Report Share Posted October 20, 2016 the ubot eval method only works on the main browser window check out a post I made on Eval UI method,it straight converts most ubot ui commands(all but some just dont work) into code to put into your own html panel,and great for debugging too the code for the ui list box is this,this creates a variable called selectionui html panel("<div class=\"uielement\">listbox<br><select size=\"4\" variable=\"#selection\" fillwith=\"value\"><option value=\"this\">this</option><option value=\"that\">that</option><option value=\"other\">other</option></select></div><",200) 1 Quote Link to post Share on other sites
cүвεя_נυηкιε 68 Posted October 20, 2016 Author Report Share Posted October 20, 2016 the ubot eval method only works on the main browser window check out a post I made on Eval UI method,it straight converts most ubot ui commands(all but some just dont work) into code to put into your own html panel,and great for debugging too the code for the ui list box is this,this creates a variable called selectionui html panel("<div class=\"uielement\">listbox<br><select size=\"4\" variable=\"#selection\" fillwith=\"value\"><option value=\"this\">this</option><option value=\"that\">that</option><option value=\"other\">other</option></select></div><",200) Thanks deliter, your a star there may be hope yet, Im not sure how i managed to miss that particular thread, .. I searched long enough lmao Ill have a play about with it and see where it goes, .Thanks again CheersCJ 1 Quote Link to post Share on other sites
PRO 69 Posted June 20, 2017 Report Share Posted June 20, 2017 Since 72 hrs I am stuck in the same problem. Tried many ways to overcome this, but it seems that passing JS to UBot variable in UI HTML Panel is a real shortcoming. If anyone has found a solution, please advise. Quote Link to post Share on other sites
PRO 69 Posted June 21, 2017 Report Share Posted June 21, 2017 Try to put all JS / jQuery directly below the closing </body> tag. This has resolved it for me. Quote Link to post Share on other sites
hare ram 23 Posted January 3, 2018 Report Share Posted January 3, 2018 i am facing same pro to click submit button to scrape in youtube channel detail for scraping contact details. Quote Link to post Share on other sites
stephenzeiner 12 Posted June 23, 2020 Report Share Posted June 23, 2020 I know this is a bit of an old thread, but I wanted to take a moment to post a reply here with a useful piece of actionable information that was very recently helpful for me, and which may be relevant and helpful for others in the future. In October 2016 'deliter' mentions: check out a post I made on Eval UI method,it straight converts most ubot ui commands(all but some just dont work) into code to put into your own html panel,and great for debugging too I think this is the post that was being referenced above:http://network.ubotstudio.com/forum/index.php/topic/19678-eval-ui-html-panel-method/?p=128633 Thank you for that post! Here's the key takeaway that I wanted to share in this thread, which shows up in search engines when someone looks up "how to pass a JavaScript variable from the UBot ui html panel to a native UBot variable." Here's how you can set the value of a native UBot Studio variable from within the "ui html panel" via JavaScript: ubot.runScript('set(#NativeUBotVariable,"'+TheJavaScriptVariable+'","Global")') 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.