Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reference the selected value of a dropdown 1

Status
Not open for further replies.

MikeT

IS-IT--Management
Feb 1, 2001
376
US
I need to pass the selected value (not text) of a dropdown to a javascript function. My select tag looks like this:
<select name=mySelect size=1 onchange=&quot;return myFunc(document.formname.mySelect.value&quot;>
&quot;value&quot; does not work, nor does &quot;selectedIndex&quot;, &quot;selectedValue&quot;, nor does &quot;selectedindex.value&quot;.
How can I do this?
 
document.formname.SelectName.options[document.formname.SelectName.options.selectedIndex].value;

Marc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top