Click to See Complete Forum and Search --> : value of a drop down
chrislynn5
02-09-2003, 02:10 PM
I've tried:
document.form1.response.options[document.form1.response.selectedIndex].value
but that doesn't work. Trying to determine the value of one of my drop downs.
thanx.
linnie
02-09-2003, 03:16 PM
This:
document.form1.response.options[document.form1.response.selectedIndex].value
is correct syntax. Check your form name and control name to make sure they are correct. Otherwise, post the HTML for your entire SELECT object.
Lin
chrislynn5
02-09-2003, 03:32 PM
thanx, it got me to look at it again, and though the syntax was correct, I didn't realize that the <option> tags value has to be set. It typically defaults to what is between the tags for the value if it has not been set. But in this case it must be set as value=" "...<option value="12345">12345</option>
thanx.