Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Select ..... Option Problem..  RSS feed

 
Manu Dhanda
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii All,

I want to select an option among the few by VALUE.

For Example-


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.

Thanks.
Manu.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have you tried

document.forms[0].selectName.value = "2";

Eric
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!