onbeforeunload Questions
8
Solved
I want to execute an action method when the user is abandoning a particular page using jQuery.
The page has the following code:
<script type="text/javascript">
$(window).unload(function ...
Andros asked 21/2, 2012 at 21:52
4
With nextjs 12 (pages router) the router returned from 'next/router' had navigation events you could listen for and handle appropriately. Here is the documentation.
One specific event is routeChang...
Yowl asked 13/10, 2023 at 14:23
3
Solved
I am running automated (python) selenium tests on a chrome browser, and sometimes when a page is reloaded a popup appears on the screeen:
Is it possible to configure the chrome selenium browser ...
Intrepid asked 9/4, 2019 at 7:12
3
Solved
How to Handle below IE Popup in Selenium
Supplement asked 22/3, 2019 at 5:28
11
This is the code which i used for window.onbeforeunload
<head>
<script>
window.onbeforeunload = func;
function func()
{
var request = new XMLHttpRequest();
request.open("P...
Contraoctave asked 26/1, 2011 at 6:50
6
Solved
I want to send an ajax request when a user leaves a page or closes the window.
Here is my code inside :
<script type="text/javascript">
function sendajax(){
$.ajax({
url: "someurl",
dat...
Cchaddie asked 3/1, 2012 at 11:10
2
Solved
I just want to show a message before leaving the page, but my code doesn't works:
window.onload=function(){
alert("Page with a digital clock");
setInterval(clock,1000);
}
window.onbeforeunload=...
Bacteriolysis asked 19/11, 2013 at 9:17
9
I'm displaying certain records in an editable table. The user when attempts to reload the table while editing a record a pop up comes warning the record about the unsaved data.
function cancelProc...
Heine asked 27/9, 2012 at 13:1
2
Solved
I need to make a simple confirm window and I saw a lot of examples of how to do it with extra actions (like waiting until file uploading of form is not field). But I need just make a default confir...
Economize asked 15/1, 2019 at 13:32
4
Solved
i know that there are hundreds of questions like: "How can i prevent close event in electron" or something like that.
After implementing a confirmation box (electron message box) in the beforeunloa...
Playa asked 22/8, 2017 at 22:5
12
Solved
I need to warn users about unsaved changes before they leave a page (a pretty common problem).
window.onbeforeunload = handler
This works but it raises a default dialog with an irritating standard...
Sciurine asked 9/11, 2008 at 23:24
4
I'm writing a google chrome extension with a popup and a background page. The popup subscribes to certain events that the background generates, and I would like to unsubscribe from those events whe...
Layoff asked 23/2, 2010 at 3:6
9
Solved
Possibly related to How to open mailto link in Chrome with Window.open without creating a new tab?
Hi all. I have a form page where i've put a window.onbeforeunload confirm, to stop people navigat...
Skaggs asked 16/3, 2012 at 15:54
4
Solved
I'm trying to write a Selenium test for a web page that uses an onbeforeunload event to prompt the user before leaving. Selenium doesn't seem to recognize the confirmation dialog that comes up, or ...
Bootblack asked 2/10, 2008 at 19:24
10
Solved
How to prevent a webpage from navigating away using JavaScript?
Leontina asked 4/5, 2009 at 17:19
2
Solved
I need to warn users that they will lose information when leaving a page. This is easily done using the onbeforeunload event. My problem is that I want to take some action if the user decides to le...
Stubstad asked 8/4, 2013 at 15:29
5
Solved
Obviously, window.onbeforeunload has encountered its fair share of problems with Chrome as I've seen from all the problems I've encountered. What's the most recent work around?
The only thing I've...
Subcelestial asked 8/3, 2012 at 22:27
11
Problem: I have a site with dynamic content which needs to be reloaded every time the user sees it. This includes the use case when a user hits the back button on an another site and comes to the s...
Fishworm asked 28/1, 2012 at 14:56
17
Solved
Here in stackoverflow, if you started to make changes then you attempt to navigate away from the page, a javascript confirm button shows up and asks: "Are you sure you want to navigate away from th...
Bolide asked 13/7, 2009 at 12:57
6
Solved
I am popping up a dialog box when someone tries to navigate away from a particular page without having saved their work. I use Javascript's onbeforeunload event, works great.
Now I want to run som...
Marius asked 10/1, 2011 at 19:34
6
Solved
I'm trying to post data when a user leaves my page. I have finally managed to find a working solution, however, it shows a confirmation dialog when the user leaves. I have tried return null; but it...
Vexed asked 19/6, 2013 at 9:45
2
Solved
I am trying to get onbeforeunload to work with a set timer of sorts but I can't seem to get it to fire up when the return is in place. I am hoping it would work with a timer but for some reason the...
Kenric asked 24/9, 2012 at 19:37
4
Solved
I tried the following code to get an alert upon closing a browser window:
window.onbeforeunload = confirmExit;
function confirmExit() {
return "You have attempted to leave this page. If you have ...
Natterjack asked 2/12, 2008 at 11:14
4
Looks like Apple has disabled the window.onbeforeunload event for iOS devices (iPhone, iPad, iPod Touch). Unfortunately I can't find any documentation as to why this event doesn't work in Mobile Sa...
Polystyrene asked 8/11, 2010 at 20:11
5
How to prevent closing browser tab when form is dirty in Angular 2?
My html body contains a component:
<body>
<my-app>Loading, please wait...</my-app>
</body>
which c...
Nadler asked 21/11, 2016 at 12:1
1 Next >
© 2022 - 2025 — McMap. All rights reserved.