Retrieving list from form select input
I am trying to retrieve the list of options from a Select input using Javascript.
I have tried (generic names here) document.form_name.select_name.options. It seems to be an array. When I try to implode the array into a string it fails.
Surely, I am going about this wrong and there is a simple solution.
Example without < >
The answer I am looking for is "one, two" then to convert it to a string.
Thanks in advance.
I have tried (generic names here) document.form_name.select_name.options. It seems to be an array. When I try to implode the array into a string it fails.
Surely, I am going about this wrong and there is a simple solution.
Example without < >
form name select name option value=1 one /option option value=2 two /option /select /form
The answer I am looking for is "one, two" then to convert it to a string.
Thanks in advance.
