Jump to content

How to reload a web page?


maheshforum

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...