How can I get a list of all values in select box?

You had two problems:

1) The order in which you included the HTML. Try changing the dropdown from “onLoad” to “no wrap – head” in the JavaScript settings of your fiddle.

2) Your function prints the values. What you’re actually after is the text

x.options[i].text; instead of x.options[i].value;

http://jsfiddle.net/WfBRr/5/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)