RE: Need help here with 2 javaScript problems 07-28-2015, 10:03 PM
#3
(07-28-2015, 08:45 PM)Dyme Wrote: I fixed your nasty ass code so at least now test_id is receiving the selected option. I don't really know what you want for the "second part"... you're gonna have to explain it better if you want more help.
Code:<html> <script> function test() { var test_id = escape(document.getElementById('test_id').value); alert(test_id); return false; } </script> <form onsubmit="test()"> <select id="test_id"> <option value="1">1</option> <option value="2">2</option> </select> <input type="submit" name="submit" value="Submit"> </form> </html>
He means if 1 is selected, then it gives options 1a 1b, I think.
E.g.
![[Image: w0Jd3SC.png]](http://i.imgur.com/w0Jd3SC.png)
Though, I don't know for sure, so maybe not. He wasn't very clear on that.
telegram: @satan_sl















![[+]](https://sinister.li/images/modern/collapse_collapsed.png)