| Author |
How to retain the selected values in the drop down on submit
|
Aparna Sudhakaran
Greenhorn
Joined: Nov 23, 2011
Posts: 6
|
|
Hi,
I have a JSP page with two drop downs. i select values from them and click the submit button. on submit my page loads back with the google map plotting some points. that is working fine. However i want the drop downs to retain the values that have been selected on the result page as well.. how do i do that?
|
 |
Harshavardhan Joshi
Greenhorn
Joined: Sep 27, 2011
Posts: 7
|
|
You must be getting that selected value on the result page after the submission.
Just change the <option>Your_Previously_selected_Value</option> to <option selected="selected">Your_Previously_selected_Value</option>.
If you are using <option>val</option> in a loop then you have to place a check.
Hope it will help.
|
 |
 |
|
|
subject: How to retain the selected values in the drop down on submit
|
|
|