kev123 132 Posted January 30, 2013 Report Share Posted January 30, 2013 has anyone done any linking of ui drop down boxesfor example first box would be categories second box would be sub categories.so if the user picked fruit in the first drop down the second drop would populate the sub options apples,oranges etc. I could programme this in ubot but this would need to happen before the bot runs and update instantly.anyone done this? java maybe? Quote Link to post Share on other sites
AutomationNinja 194 Posted January 30, 2013 Report Share Posted January 30, 2013 You can do this using HTML with the UI HTML command and CSS. Here is a good tut http://line25.com/tutorials/how-to-create-a-pure-css-dropdown-menu Quote Link to post Share on other sites
kev123 132 Posted January 30, 2013 Author Report Share Posted January 30, 2013 cheers man i'll take a look Quote Link to post Share on other sites
kev123 132 Posted January 31, 2013 Author Report Share Posted January 31, 2013 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="en"> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <script type="text/javascript"> function moveData(data) { var parts = data.split('/'); var f = document.form1; alert(parts[0]+":"+parts[1]); f.cat.value = parts[0]; f.sub.value = parts[1]; } </script> <style type="text/css"> * {margin:0;padding:0;} </style> </head> <body> <form name="form1" action="http://www.domain.com/cgi-bin/submit.pl" method="post"> <select name="catsub" onchange="moveData(this.value);" size="10"> <optgroup label="Fruit"> <option value="Fruit/Apple">Apple <option value="Fruit/Orange">Orange <option value="Fruit/Pear"> Pear <optgroup label="Animal"> <option value="Animal/Dog">Dog <option value="Animal/Cat">Cat </select> <input type="text" name="cat"> <input type="text" name="sub"> </form> </body> </html>with a bit of roaming and digging in my memory of the old days of writing html scada reports I've come up with the attached it splits from the selector and puts it into two variables what I don't know is how to get these two variable values into ubot.any ideas or suggestions for improvements. 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.