File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes index of option 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 "index of option" Watch "index of option" New topic

index of option

Sudhir Pawar

Joined: Sep 27, 2012
Posts: 25
please tell me jsp code to get index value of option list(drop down list)

i have created drop down list as follows
<select id="instance2" >
<option value="name">Item0</option>
<option value="name">Item1</option>
<option value="name">Item2</option>

now i want to get index value of selected item in variable then how can i do this?? .
Eric Pascarello

Joined: Nov 08, 2001
Posts: 15385
MDN Select
It is sorta covered in the JavaRanch Style Guide.
subject: index of option
It's not a secret anymore!