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

DropDown hell!!!!

Status
Not open for further replies.

NevG

Programmer
Oct 10, 2000
162
GB
Can someone plaease tell me how I can put the text value of a Dropdoqwn into a variable ??

I cannot figure it out. I can get as far as retrieving the slecetd index of the itme in the drop down but thats it. Please help me !!!!!!!!!!!!!!!!!!


Thanx
Nev [sig][/sig]
 
The basic syntax for the selected value is this:-

document.myForm.mySel.options.text;

where myForm is the form name,
mySel is the name of the <SELECT> tag,
and is the index of the selected item.

Stick this into a string variable and you're in business.

Enjoy :) [sig][/sig]
 
The basic syntax for the selected value is this:-

document.myForm.mySel.options.text;

where myForm is the form name,
mySel is the name of the <SELECT> tag,
and is the index of the selected item.

Stick this into a string variable and you're in business.

PS Sorry about the last post - forgot to turn off the TGML processor :-0


[sig][/sig]
 

Fatbloke,
FYI, If you post something that's incorrect, red-flag the post and in the red flag explanation tell the admins the problem, and they'll delete the incorrect post.
[sig]<p>nick bulka<br><a href=mailto: > </a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top