Jump to content
UBot Underground

How To Define A Submit Button For Ui Textbox In Ui Designer?


Recommended Posts

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 you

sheiku

Edited by sheiku
Link to post
Share on other sites

pfff...

i found it...quite hard, 2 hours i lost but it is working

I must to use the ID of the button ( in my example the #TextBox0) and to define a comand using another Ui textbox

quite strange....

any options?

 

define buton_submit {
    ui text box("field_I_retrieve_value",#TextBox0)
    alert(#TextBox0)
}

Edited by sheiku
Link to post
Share on other sites

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

  • Like 1
Link to post
Share on other sites

Thank you deliter

I need to read again your code to understand it

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

 

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 by sheiku
Link to post
Share on other sites

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}")
}
  • 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...