I am stumped. I have a form with a dropdown list, and I would like to grab a list of all the values in the list. I pulled the below example from w3 schools (yes, I know it\'s un
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/