Please see this Image view that what i exactly want to do…
<%
for(;IteratorOfList.hasNext();)
{
String optionValue = IteratorOfList.next();
%>
<select id='1'>
<option value="Aunt">Aunt</option>
<option value="Brother">Brother</option>
<option value="Brother in law">Brother in law</option>
<option value="Cousin">Cousin</option>
<option value="Doughter">Doughter</option>
</select>
<%}%>
in this above code suppose for loop runs three times and hence we got three select boxes so my question is that how can i select options in all this three select box which i have fetched from the DATA BASE and all three values have binded in request object only just to select the three differnt values in these select….
I quite did not understand your question..but tried my best..
You want to populate a drop down list with the list of strings.
I am using
Jqueryto do this.Once you have the array of strings in your
javascriptyou then iterate through the array and create the<option>elements with the array values and append it to theselectbox.According to the updated question.. I made the changes and here is the JSFIDDLE