How to prevent closing browser window?
Another implementation is the following you can find it in this webpage: http://ujap.de/index.php/view/JavascriptCloseHook <html> <head> <script type=”text/javascript”> var hook = true; window.onbeforeunload = function() { if (hook) { return “Did you save your stuff?” } } function unhook() { hook=false; } </script> </head> <body> <!– this will ask for confirmation: –> <a href=”http://google.com”>external link</a> <!– … Read more