I am having a problem getting my page state/history work with the Back button.
I have two jsp pages. In the first page, I am dynamically building a select dropdown 'A' based and replacing the earlier select when an onclick event happens on the dropdown button. This I am doing by appending my built innerHtml to the Div element around the Select input. There is a radio buttons-'B' section on my page. I am also modifying the text for a <TD> section on the page based on the 'B' radio buttons selection.
Now, I select a value from the dropdown-'A', and and do a page submit. From the 2nd page, I click on the browser Back button. Now in the first page, I do not see my initial changes done to the DOM preserved. By initial changes, I mean: The dynamically populated Select dropdown, and the Modifying of the text for a <TD> section are getting lost.
The dropdown is getting set to the initial dropdown that I had loaded when the page is laoded for the first time Or I can say the page is reloading for the caseof these elements.
Please, let me know how to preserve my dynamically populated state.