Top "Onunload" questions

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

I have written this code function winUnload() { alert("Unload Window"); MyMethod(); } window.onunload = function() { winUnload(); } This code is working fine …

javascript browser onunload window.onunload
How can I get the destination URL for the onbeforeunload event?

I've searched for hours, but I couldn't find a solution for this. window.onbeforeunload = warn; This doesn't work: function warn (…

javascript url javascript-events onunload
Javascript onload and onunload

Consider the following HTML snippet containing some javascript utilizing prompt and unload. The prompt() method works fine but I want …

javascript html onload onunload
How to block pop-up coming from iframe?

I'm embedding page that has an exit pop-up. When you close the page, it automatically launches a pop-up window. How …

javascript html iframe popup onunload
Is the onbeforeunload event not supported on iPhone?

Looks like Apple has disabled the window.onbeforeunload event for iOS devices (iPhone, iPad, iPod Touch). Unfortunately I can't find …

jquery iphone mobile onbeforeunload onunload
Capturing result of window.onbeforeunload confirmation dialog

Is there a way to capture to result of the window.onbeforeunload confirmation dialog like the one below from Stack …

javascript jquery dom-events onunload window.onunload
OnUnload Alert Error "NS_ERROR_NOT_AVAILABLE"

<html> <body> <button type="button" onclick="clickme()">Click Me</button> <script&…

javascript alert onunload window.onunload
Can I pop up a confirmation dialog when the user is closing the window in Safari/Chrome?

In IE and FF, i can attach an event handler to onBeforeUnload, and by passing a string to a property …

safari google-chrome onbeforeunload onunload
DOM Window unload event, is it reliable?

Can I rely on the window unload event to be triggered when a user closes a tab/window/browser? Edit: …

javascript dom browser onunload