This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes What is the listIndex? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "What is the listIndex?" Watch "What is the listIndex?" New topic

What is the listIndex?

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1533
If I have a particular string that I know is one of the values of a select list how can I use this string to find the list item index so I can use it in a remove command?
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
You can try this:

or loop through the options, look at the text or value and get the index that way.

subject: What is the listIndex?
jQuery in Action, 3rd edition