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 Murach's Java Servlets and JSP this week in the Servlets 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: 15376
MDN Select
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: index of option
Similar Threads
ArrayList gets duplicate values in JSP
Advanced selection in a drop-down list
How to retain value in struts 2 using <s:select></s:select> tag
struts-2 value stack issue...
Populating a value based on the option selected in the dropdown