Preventing page unload with JavaScript
The onbeforeunload event handler (supported by Internet Explorer 4+ only) can be used to confirm that the user does want to close the browser window or navigate away from the current page. If your event handler returns something, this message will be included in a confirmation which the user must...
[Read More]