and a submit button. When you click the submit button, based on options and text entered,the results page would be displayed, with the drop down and text box again on the page. What i want is: If the user selected Option1 in the drop down, that search type should remain until the user either changes the selection or ends their session. But i find that the first option comes back again.
how can i achieve this functionality?
posted 8 years ago
are you using any frame work? It is possible to set form elements in struts.
If it is plain jsp, try setting 'option' in a session.
<option selected>session element goes here</option>
so what ever the user selects is set in a session and when he comes back he sees that option in the drop down list.