Top.Mail.Ru
? ?
Javascript's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Wednesday, July 14th, 2004

Time Event
11:10a
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 < >

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.

<< Previous Day 2004/07/14
[Calendar]
Next Day >>
About LiveJournal.com
Image