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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get the selected Item value from a drop-down list

Status
Not open for further replies.

smithpe

Programmer
Jul 2, 2002
2
US
Hi

I have been having a hard time with this one. What I am trying to do is pull the selected item value from a drop-down list. I need to be able to pass that value to another page. I can with an onchange statement see the value but not save to any type of variable.

Here is the onchange statement
Code:
onchange="alert('Value: ' + this.options[this.selectedIndex].value)"

Any ideas how to save this to a variable so I can then pass it on to another web page.

[noevil]

Thanks

Paul Smith
 
Code is really

Code:
onchange=&quot;alert('Value: ' + attr_value<%= attr %>.options[attr_value<%= attr %>.selectedIndex].value)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top