Jump to content
UBot Underground

UI HTML Panel Tricks and Tips


Recommended Posts

Hello everyone.

 

For those of you that own a dev license and make good use of the ui html panel, I have some useful information for you.

 

have you ever created a bot that was loaded with ui elements? Maybe to the point that space became an issue? Here is a time and space saving tip for you.

 

Instead of using labels to explain the purpose of of an input box, why not place the instructions inside the box? You can do this with a simple addition to the attribute area of the input box. The best part is it will be coded to clear when you click on it to insert the desired data. The code is simple and uses just a small line of javascript. Here is an example:

 

 

<input variable="#un" fillwith="value" type="text" id="username" value="Insert Username Here" size="30" onfocus="this.value='';return false;">

 

Now here is a little known feature:

 

If you have the default form fields filled out in the options section, and have used those variable names in you script, they will pre-load in the ui html panel ui elements.

 

John

  • Like 1
Link to post
Share on other sites

Thanks Kreatus. I will probably post some more, but you guys can actually do what I am doing...going through the entire library of free snippets. There is a TON of really cool stuff there:

 

http://javascriptsource.com/alphabetical-listing/?select=A

 

I started in A and am currently in T...there is too much to post, but there is definitely something for everyone...

 

A little tip:

 

If the code requires a .js file, you can host it remotely and it will still function in the ui html panel. Just make sure you change the path.

 

 

John

Link to post
Share on other sites

Hey John, nice idea, but I have noticed that this stops working as soon as you use variable in code. I just added code

set(#tmp, #un, "Global")

bellow "UI HTML Node", and it stopped working...

 

Any idea how to solve this? I talked with Eddie about related problem, but it looks like there is no solution - ubot will always clear that value on load.

Link to post
Share on other sites

Instead of using labels to explain the purpose of of an input box, why not place the instructions inside the box? You can do this with a simple addition to the attribute area of the input box. The best part is it will be coded to clear when you click on it to insert the desired data. The code is simple and uses just a small line of javascript. Here is an example:

 

 

<input variable="#un" fillwith="value" type="text" id="username" value="Insert Username Here" size="30" onfocus="this.value='';return false;">

 

Now here is a little known feature:

 

If you have the default form fields filled out in the options section, and have used those variable names in you script, they will pre-load in the ui html panel ui elements.

 

John

 

Hi John

 

Thanks for the tip, it's very useful. I'll start to work through the A to Z examples too.

 

I guess some of them can be combined with the css things I was working with here: http://ubotstudio.co...rowser-version/ too, so combining them could be very powerful.

 

+1 from me,

 

Phil

Link to post
Share on other sites

I'm not sure what you mean...it seems to work fine for me...

 

http://screencast.com/t/tLejx1iKA

 

 

John

 

Hey,

 

The problem is that value of inuput box "Inser Username Here" disappears, when you add that second line of code. See video: http://screencast.com/t/tIDznFvp

 

The same thing happens if I save, close and re-open the bot. Input box will have value "Insert Username Here" just for few mili seconds, that it will get cleared by ubot.

Link to post
Share on other sites

I am not seeing that:

 

http://screencast.com/t/Hjwrwi3R

 

Try clicking on new in the file menu, and you probably won't see that

 

John

 

Strange, it doesnt work for me this way. :/ What happens if you save, close and reopen that bot with 2 nodes? Will it still show that value (Insert Username Here)? Here is a new video, demonstrating the issue: http://screencast.com/t/04CYSqbSFDR

Link to post
Share on other sites
  • 3 weeks later...

Here's a little trick to have tooltips on your UI's even if you only have standard license.

 

ui text box("<span title=\"Enter your username\">Username:", #test username)
ui text box("</span><span title=\"Enter your password\">Password:", #dsada2)

 

Just make sure you put the <span> ending tag to the next UI.

  • Like 3
Link to post
Share on other sites

Here's a little trick to have tooltips on your UI's even if you only have standard license.

 

ui text box("<span title=\"Enter your username\">Username:", #test username)
ui text box("</span><span title=\"Enter your password\">Password:", #dsada2)

 

Just make sure you put the <span> ending tag to the next UI.

 

Nice share! +1

 

John

 

 

 

Link to post
Share on other sites
  • 3 weeks later...

<input variable="#un" fillwith="value" type="text" id="username" value="Insert Username Here" size="30" onfocus="this.value='';return false;">

 

Hi John, From your example code when you click on a textbox and focus on other textbox or element the initial value of that textbox will disappear. Do you know how to do something like the textboxes on this page https://www.facebook.com/pages/create.php that when you click on a textbox and didnt type anything there then move to another textbox the initial value will appear again.

 

Thanks

Link to post
Share on other sites
  • 4 months later...

I'm not sure, but I will investigate it. It certainly would make it much cooler if it's possible.

 

 

John

 

Found it john. Just enter a placeholder tag.

Here's a sample below:

<input variable="#textbox" fillwith="value" type="text" name="textfield" placeholder="Enter Username" >
<br>
<input variable="#textbox" fillwith="value" type="text" name="textfield2" placeholder="Enter Password" >

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