Is it possible to cancel the browser close window event? Or at least add a message prompting the user whether they are sure they want to leave the page? I tried doing this with the beforeunload event, but it still closes the browser. I am looking for something similar to Microsoft’s exchange website.
Thanks!

Here is an Html Code:
Paste this code into the text area on this page: http://www.htmlpreview.richiebrownlee.com press the button, then exit out of the page that comes up..