I am facing one problem while coming back on clcik of browser back button:
In my application I have 2 drop downs.
1st Drop down : This is getting populated in jsp itself .
<option value="archive_false"><IM:get.localized.text localeCode="<%=strUILocale%>" key="SEARCH.ARCHIVE_OFF" /></option>
<option value="archive_true"><IM:get.localized.text localeCode="<%=strUILocale%>" key="SEARCH.ARCHIVE_ON" /></option>
After following steps:
Step 1 : Select some value in both drop down
Step 2 : Click on a hyperlink on the page and control will take you to next page
Step 3: Click on browser back button , It will take you to previous page
The problem occurs : In this page the 1st drop down is retaining the selected value but the 2nd drop down is not retaining the selected value.
I have to retain the selected value of both drop downs.
Second drop down won't, because every time the page is loaded it's populated with dynamic values. So may be you could somehow store the selected index from the 2nd drop down, when the user navigates to the next page hyperlink, now when you are back the previous page retrieve the stored index and use that. Could you show the code how you are populating the 2nd drop down?
Joined: Jan 31, 2011
this is the drop down in jsp :
this is getting populated in JS function (populateDropDown) where dropDownElem is documentTypeFilter. This function is getting called by initialize method of the same JS.