maheshforum Posted August 8, 2008 Share Posted August 8, 2008 Hi All, I want to reload the whole jsp page while clicking the browser back button how can I do it? Please any suggestionsThanks and Regards,Mahes Link to comment Share on other sites More sharing options...
aspnetguy Posted August 8, 2008 Share Posted August 8, 2008 The back button will take you back on step in the browsing history. You cannot make it refresh the page. Link to comment Share on other sites More sharing options...
jesh Posted August 8, 2008 Share Posted August 8, 2008 I don't know how reliable this is - I've haven't really tested it too much - but, according to this guy, you can do it:http://www.hunlock.com/blogs/Mastering_The...With_JavascriptIt's as simple as the difference between this: <html><body></body></htm> and this: <html><body onbeforeunload=""></body></html> A couple simple tests that I just did here show that there is some promise to it. Link to comment Share on other sites More sharing options...
Jesdisciple Posted August 8, 2008 Share Posted August 8, 2008 Note that Opera has yet to implement onbeforeunload (as far as I know), but it is on their to-do list. Link to comment Share on other sites More sharing options...
aspnetguy Posted August 8, 2008 Share Posted August 8, 2008 also note for the below example there are the 3 ways you can implement it in IE, only option 3 works in Firefox (1)<body onbeforeunload='confirmExit();'>(2)document.body.onbeforeunload=confirmExit;(3)window.onbeforeunload=confirmExit;function confirmExit(){ return "You are about to leave this page. Are you sure?";} Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.