A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Select ..... Option Problem..
Joined: Jan 28, 2006
Dec 12, 2006 03:19:00
I want to select an option among the few by VALUE.
Select by given Value : <SELECT NAME=anyName> <OPTION value="1">One</OPTION> <OPTION value="2">Two</OPTION> <OPTION value="3">Three</OPTION> </SELECT>
Now suppose I have the value "2" with me and now I want to select the option by this value.
How can I do that??
Help me out, am trying to work out this problem with my code here, but couldn't get through it yet.
"Books are as useful to a stupid person <br />As a mirror is useful to a blind person." <br /> <br />Chanakya quotes (Indian politician, strategist and writer, 350 BC-275BC)
Joined: Nov 08, 2001
Dec 12, 2006 05:09:00
have you tried
document.forms.selectName.value = "2";
I agree. Here's the link:
subject: Select ..... Option Problem..
Any Suggestion about a small project?
How to show selected value, and name of list menu
Create a box
Inline Form Validation
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014