Capturing result of window.onbeforeunload confirmation dialog

You can have the exit confirmation using window.onbeforeunload but there isn’t a way to find out which button the user clicked on. To quote an earlier response from jvenema from this thread: The primary purpose for the beforeunload is for things like allowing the users the option to save changes before their changes are lost. … Read more

window.onunload is not working properly in Chrome browser. Can any one help me?

There are some actions which are not working in chrome, inside of the unload event. Alert or confirm boxes are such things. But what is possible (AFAIK): Open popups (with window.open) – but this will just work, if the popup blocker is disabled for your site Return a simple string (in beforeunload event), which triggers … Read more