Hi, I have a pair of
jsp pages and I want to maintain the state of the fields between the pages.
How do you reset the "selected" value in an options drop down box?
I have the value stored on page two like this:
<input type="hidden" name="suff1" <%if(request.getParameter("suff1")!=null){%>value="<%=request.getParameter("suff1")%>"<%}%>>
On page one I want to get the selected option, I tried this but it doesn't work:
<select name="suff1">
<option value="AM" <%if(request.getParameter("suff1")!=null && request.getParameter("suff1")=="AM"){%>selected<%}%>>AM</option>
<option value="PM" <%if(request.getParameter("suff1")!=null && request.getParameter("suff1")=="PM"){%>selected<%}%>>PM</option>
</select>
Thanks