Click to See Complete Forum and Search --> : Javascript to populate drop-down select box


Comike14
October 25th, 2005, 11:40 AM
Hello. I'm trying to figure out how I can use JavaScript to populate a dropdown box in HTML. I have an array that I changes dynamically according to user option circle choices in a form, and I want to be able to change the dropdown box to match what is in the array whenever a user changes the option. I haven't really been able to find any information on this, so I'm hoping someone can help me out. Thanks.

PeejAvery
October 25th, 2005, 01:47 PM
Are you talking about this? Dynamic Options (http://www.quirksmode.org/js/options.html) can also add new items to <SELECT> tags as well.

Comike14
October 25th, 2005, 02:12 PM
That's pretty much exactly what I was looking for. Thanks!

PeejAvery
October 25th, 2005, 03:01 PM
Not a problem.