aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Select   ..... Option  Problem.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Select   ..... Option  Problem.." Watch "Select   ..... Option  Problem.." New topic
Author

Select ..... Option Problem..

Manu Dhanda
Greenhorn

Joined: Jan 28, 2006
Posts: 23
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.


"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)
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
have you tried

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

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Select ..... Option Problem..