how do i get the id and not the value of the parameter?

i have a drop down i need to use the folowing to get the id

<select name="<c:out value="${item}"/> SchoolOrg">

<option> Please Select... </option>

<c:forEach var="ed" items="${edd.educations}">

<option id ="<c:out value="${ed.educationid}"/>" name="<c:out value="${ed.schoolorganisation}"/>">

<c:out value="${ed.schoolorganisation}"/>

</option>

</c:forEach>

</select>

i get the value using the following but i want the id instead...?

int educationid = request.getParameter( i +"SchoolOrg");

[1070 byte] By [h1400046a] at [2007-11-14]
# 1
Instead of <option id="something">...</option> use the value attribute as in<option value="something">...</option> With the value attribute you will be able to get the value of the selected option from the dropdown.
appy77a at 2007-7-9 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 2

i changed it to this but it still doesnt work

<select name="<c:out value="${item}"/> SchoolOrg">

<option> Please Select... </option>

<c:forEach var="ed" items="${edd.educations}">

<option value = "<c:out value="${ed.educationid}"/>">

<c:out value="${ed.schoolorganisation}"/>

</option>

</c:forEach>

</select>

and :

int educationid = Integer.parseInt(request.getParameter( i +"SchoolOrg"));

i want the id back not the value of the dropdown

h1400046a at 2007-7-9 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 3
form element shouldn't have a dynamic name.. if you have multiple element you can use request.getParamterValues("formElementName"). In this case you can store it into an array thus you will have lesser code..
jgalacambraa at 2007-7-9 > top of java,Enterprise & Remote Computing,Web Tier APIs...
# 4

There is no way to get the value of an id attribute in the form of a request parameter as far as the <select> and <option> element is concerned.

If you are on the same page you can do something with Javascript

var someObject = getElementById(Id);

Then with Javascript you might be able to access the id attribute, but I'm not sure about that, and it has to be done on the same page.

appy77a at 2007-7-9 > top of java,Enterprise & Remote Computing,Web Tier APIs...