Forum Moderators: open

Message Too Old, No Replies

Browser back Button displaying new data in the old page

         

venky_nk

2:13 pm on Jul 22, 2005 (gmt 0)

10+ Year Member



We have a combo box in a JSP page and upon selection of a value from combo box, we fetch data from DB and display the new data in a new page, and when the user selects back browser button, IE displays all the previous data except that the combo box shows the new value that was selected by the user rather than the old value. can somebody tell us where we are doing wrong w.r.t combo box data display?

Venkatesh

john_k

2:22 pm on Jul 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I.E. just does this with forms. About 60% to 70% of the time anyway. I am not sure if it is by design or by flaw. For example, I am currently typing in the "Compose Reply Message" textbox. If I go to a new page, then use the Back button to return, sometimes the textbox will still contain my text, and sometimes it won't.

You might try adding a form refresh to the body onload.

venky_nk

7:23 am on Jul 25, 2005 (gmt 0)

10+ Year Member



I tried the following:

var sURL = unescape(window.location.pathname);
window.location.replace( sURL );
window.opener.loction.reload();
window.location.reload( true );
document.forms[0].submit();

in body OnLoad, but this is fetching data from server and refreshing the complete page. Is there a way to refresh only the browser, because one thing I found was when I click on the back browser and do a "view source" I am able to see the valid data as part of the source in the page, but the data being displayed in the combo box is invalid in JSP.

john_k

5:06 pm on Jul 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I said refresh in my previous post, but I meant "reset" - form.reset(). If there is only one form on the page, then it would be

document.forms[0].reset();

venky_nk

7:37 am on Jul 26, 2005 (gmt 0)

10+ Year Member



John,

Thanks so much. It is working fine now.