onunload Questions

2

I am trying to send data when the window closes to prevent 2 people from editing and overwriting each others data. Currently I am using a sendBeacon within a unload event handler. FireFox: Refresh...
Uboat asked 10/11, 2020 at 17:12

3

Solved

Is there a way to capture to result of the window.onbeforeunload confirmation dialog like the one below from Stack Overflow (this happens when leaving the 'Ask Question' page without posting the qu...
Nereus asked 23/3, 2011 at 0:43

5

Solved

I want to notify the server on user closes browser window. I tried all of the $(window).bind("beforeunload", function() { $.get("${contextPath}/notify?direction=logout"); }); ...
Tequila asked 10/2, 2012 at 22:16

6

Solved

Consider the following HTML snippet containing some javascript utilizing prompt and unload. The prompt() method works fine but I want alerting something like Goodbye, user when reloading or leaving...
Dashtilut asked 28/3, 2012 at 12:49

1

This is a strange issue only in Win8.1. As we all know, if there is a running application in a machine, there should not be any other behavior against the application when we connect/disconnect/re...
Chromosphere asked 3/7, 2014 at 5:49

7

I'm embedding page that has an exit pop-up. When you close the page, it automatically launches a pop-up window. How to disable pop-ups coming from the iframe on exit?
Gastroenteritis asked 16/12, 2010 at 13:36

7

I have written this code function winUnload() { alert("Unload Window"); MyMethod(); } window.onunload = function() { winUnload(); } This code is working fine in IE and Firefox. But this code...
Selfconfidence asked 17/10, 2011 at 13:15

1

I'm talking about a styled dialog, instead of the default 'beforeunload' dialog that can't be styled. See Facebook: What is the most unobtrusive way to make this? Preferrable some script that I...
Emerick asked 10/3, 2015 at 16:26

1

After an element is removed from the DOM, will its event listeners automatically be unregistered and their referenced resources (closures) cleaned up? If yes, will the answer change if some non-eve...
Discriminate asked 17/1, 2015 at 1:40

6

Solved

I'm building a fail safe for my form that is going to warn users that if they leave the page their form data will be lost (similar to what gmail does). window.onbeforeunload = function () { if ...

4

Solved

I have a form and I must notice user with alert() on exiting page while there are data in the form that had not been send. I've read that opera has a lot of problems with this. Opera 11 that is, b...
Message asked 13/1, 2011 at 17:39

3

Solved

I've searched for hours, but I couldn't find a solution for this. window.onbeforeunload = warn; This doesn't work: function warn (e) { var destination = e.href; alert(destination ); } Okay, s...
Physiography asked 6/11, 2009 at 10:21

1

Solved

<html> <body> <button type="button" onclick="clickme()">Click Me</button> <script> var test = 0; function clickme() { test = 1; console.log(test); } window.onunl...
Theomania asked 13/5, 2013 at 7:59

1

Javascript - document.location or window.location or window.location.href or location.href does not work in Google Chrome 6 and 7(i didnt test lowers versions) when called from the window/body unlo...
Infantile asked 5/8, 2011 at 11:46

4

Solved

I am writing an application in GWT and I need to detect when a user navigates away from my application or when he closes the browser window (onUnload event) and do a logout (session invalidation an...
Mont asked 20/5, 2009 at 15:2

3

Solved

Having not any answers to my previous questions about using javascript to measure page turn times, I'm going to start writing my own code (!). To measure the length of tie it takes, I'm proposing ...
Sliver asked 17/5, 2010 at 12:37

3

I need a message script that will only come up when people are leaving the current webpage and not the current website. When people are leaving the website entirely, the message will come up and t...
Risk asked 27/5, 2010 at 12:49

4

I have a situation where on page unload I am firing a request to delete the draft of a user's work. This works fine until a user chooses to refresh the page, whereupon inspecting Chrome's network t...
Acquittal asked 17/2, 2011 at 20:27

1

Solved

How can the iframe's unload event be triggered when removing it? Using the code below, when removeChild(iframe) is called, the onunload event is not triggered. <!-- parent.html --> <html...
Urbanism asked 30/12, 2011 at 7:13

4

Solved

In IE and FF, i can attach an event handler to onBeforeUnload, and by passing a string to a property of the event, the user will see a dialog asking him whether he wants to continue with the "unloa...
Drench asked 29/4, 2009 at 19:27

1

Solved

I have an iframe in a page. When the iframe is closed I would like to refresh the parent page. Checking out the iframe element w3 page I see there are no standard events. I considered a polling ap...
Dunleavy asked 6/10, 2010 at 10:2

1

Is there a Rails helper or a Rails way of preventing the user from leaving the current page if they're typed something into the form on the current page? I'm trying to prevent people from losing d...
Oreste asked 23/2, 2011 at 7:29

3

I want to fire onunload event to do some clean up operations, I have multiple tabs(Navbar) showing multiple links to different web pages,my problem is that even when I'm in some other page my unloa...
Clearstory asked 10/8, 2009 at 13:26

2

Can I rely on the window unload event to be triggered when a user closes a tab/window/browser? Edit: Found a list of what triggers the unload event in IE. http://msdn.microsoft.com/en-us/library/...
Jahdol asked 20/10, 2009 at 13:17

3

Solved

I have an issue with a task management application where occasionally users close their browsers/tabs and the information which they type goes away because they accidentally close a browser/tab, re...
Paronomasia asked 19/10, 2009 at 15:46

© 2022 - 2024 — McMap. All rights reserved.