sheiku 1 Posted April 18, 2017 Report Share Posted April 18, 2017 (edited) Hi,for the veterans it is a simple task.I know how to use buttons, textbox ..but NOT in the UI designer. But when i define the textbox in UI designer i have no submit buton and NO correspondingVariable text..So how can i submit ( and retrieve ) the value i type in a UI textbox? I need the value i enter in the textbox.I canot see no tutorial on internet.. Thank yousheiku Edited April 18, 2017 by sheiku Quote Link to post Share on other sites
sheiku 1 Posted April 18, 2017 Author Report Share Posted April 18, 2017 (edited) pfff...i found it...quite hard, 2 hours i lost but it is workingI must to use the ID of the button ( in my example the #TextBox0) and to define a comand using another Ui textboxquite strange....any options? define buton_submit { ui text box("field_I_retrieve_value",#TextBox0) alert(#TextBox0)} Edited April 18, 2017 by sheiku Quote Link to post Share on other sites
deliter 203 Posted April 18, 2017 Report Share Posted April 18, 2017 heres how to do that, I added bootstrap to the page, to make the elements nice looking, basically you need to add a variable="#myVariable" attribute to the textbox to set the variable and for the button a onClick="ubot.runScript('myScriptHere')" to the button which fires the ubot script edit you meant the UI designer not panel, well this is still pretty much how that works ui html panel("<head> <link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/cyborg/bootstrap.min.css\" crossorigin=\"anonymous\"> <style> div\{ text-align:center \} </style> </head> <body> <div> <label for=\"inputdefault\">Type Something</label> <input variable=\"#myInput\" class=\"form-control\" id=\"inputdefault\" type=\"text\"> <button type=\"button\" onClick=\"ubot.runScript(\'clickMe\')\" class=\"btn btn-danger\">Click Me</button></div> <script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js\"></script> <script src=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js\" integrity=\"sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa\" crossorigin=\"anonymous\"></script> </body>",300) define clickMe { alert(#myInput) } 1 Quote Link to post Share on other sites
sheiku 1 Posted April 18, 2017 Author Report Share Posted April 18, 2017 (edited) Thank you deliterI need to read again your code to understand itvariable="#myVariable" attribute to the textbox to set the variableand for the button a onClick="ubot.runScript('myScriptHere')" to the button which fires the ubot script because i do not understand it...I need the simplest version, without CSS..cdn...to understand the basic command. also It was a mistake in my signature..i have PRO version , not developer,( i edited after) so i suppose the ui html panel will not work for me. Edited April 18, 2017 by sheiku Quote Link to post Share on other sites
HelloInsomnia 1103 Posted April 18, 2017 Report Share Posted April 18, 2017 You will need Dev edition for the UI HTML Panel. Here is a simple version of what you asked for so you can see how it works if you ever decide to upgrade: ui html panel("Name: <input type=\"text\" variable=\"#name\"> <input type=\"button\" value=\"Say Hello\" onclick=\"ubot.runScript(\'SayHello\');\">",100) define SayHello { alert("Hello {#name}") } 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.