Jump to content
UBot Underground

Get dynamic variables from load HTML


Recommended Posts

Hello. I'm pretty sure to know already the answer but I try to ask it anyway.

 

Is there a way to make this script work (to set correctly the variable) inside LOAD HTML command?

 

load html("

 

<select size=\"5\" variable=\"#project\" fillwith=\"value\">

<option>Website</option><option>Domains</option><option>Directory</option>

</select>

 

<button onclick=\"ubot.runScript(Load project()')\">Load</button>

")

 

The define "Load project" should just get the variable #project and make some things with it.

 

It's working normally if used in UI html Window or UI html Panel but I would need it in the Load html command...

 

If anybody could be give me a suggestion it will be apreciated!

Link to post
Share on other sites

Hi,

 

This seemed to work:

load html("
<form name=\"testme\">
<select name=\"proj\" size=\"5\" variable=\"#project\" fillwith=\"value\">
<option>Website</option><option>Domains</option><option>Directory</option>
</select>
</form>
<button onclick=\"ubot.runScript(\'Load project()\')\">Load</button>
")
define Load project {
   set(#project, $eval("document.testme.proj.options[document.testme.proj.selectedIndex].value"), "Global")
   alert("run {#project}")
}

 

Got the button to work. Code will now get the selected value from the page.

 

Kevin

Link to post
Share on other sites
  • 2 years later...
  • 1 year later...

Hi,

 

This seemed to work:

load html("
<form name=\"testme\">
<select name=\"proj\" size=\"5\" variable=\"#project\" fillwith=\"value\">
<option>Website</option><option>Domains</option><option>Directory</option>
</select>
</form>
<button onclick=\"ubot.runScript(\'Load project()\')\">Load</button>
")
define Load project {
    set(#project, $eval("document.testme.proj.options[document.testme.proj.selectedIndex].value"), "Global")
    alert("run {#project}")
}
Got the button to work. Code will now get the selected value from the page.

 

Kevin

 

 

 

Hey Kevin, 

 

Sorry to bring a 4 year old post up, and sorry to the thread starter for hijacking lol, ..

but do you (or anyone reading) know of a way to get the same result with a UI HTML "Panel" ?

 

Ive tried a shed load of possible javascript, Jquery combinations but I can not get a js variable back into a UBot variable from a UI Panel, .. 

no problems what so ever doing the exact same thing within a Load HTML, 

 

There must be a way .... right ?

 

 

Anyone please feel free to jump in and say something like "of course its possible you idiot", ... and then point out how simple it actually is, .. 

I would rather look stupid than find out its impossible :P

 

 

 

Cheers

CJ

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...