Can any one help?
I have a JSP which has a dynamically built dropdown list box,
when selecting from the list I call another JSP page but
I need to remember what I have selected and display it on my new page.
What would be the best way of doing this?
see code below:-
*******************************
<form name="form" action="enquiry_page2.jsp">
<select name="site" size=1 onChange="window.document.form.submit()">
<%
String[] ids = mybean.getInstallids();
String[] desc = mybean.getInstalldesc();
for (int i=0; i< ids.length; i++){
if (i != ids.length)
out.print("<option value='" + i + "'>" + ids[i] + " - " +
desc[i] + "</option>");
else
out.println(" " + ids[i]);
}
%>
</select>
</form>
*********************************
Note I can see the index of the item I have selected but I don.t think I
should need to
extract it from the URL and then do a get from 'mybean' there must be a
better way.
Any help would be useful.
Thanks in Advance
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets