Questions tagged [onunload]
198 questions
0
votes
0 answers
function similar to unload in jquery
I have a file update.php in which shows a link upon execution. Clicking on that link takes you to download.php which takes a lot of time to load. I want that while that file is loading, there must be a progress bar or pop up box to tell user that…

Varsha
- 1
- 3
0
votes
2 answers
update mySQL tables upon window unload
When a user navigates away from a particular webpage, I need to update the database via PHP code, preferably without a popup window.
The code below opens a "Confirm Navigation" popup, and works if I respond "Leave this Page", by navigating away and…
0
votes
0 answers
Execute php code via ajax, when user leaves any of the booking-process steps of an e-commerce website
Im working on an ecommerce website which has a booking process composed by multiple steps, and I need to run some php code when the user leaves from the booking process ( so closes the browser from any of the steps, or clicks back multiple times,…

user3641644
- 1
- 1
0
votes
1 answer
open a popup when user closes page
I need a javascript function where it opens a popup whenever a user closes the window, then in the actual window i need to be able to close that original page that the user tried to close(if the user clicks "I'm sure i want to close" or…

mmp51d
- 41
- 1
0
votes
1 answer
Javascript/jQuery: does anybody already created a loading fixed div on top 100%:100% of the page with jquery?
i used sometimes a 'loading' method with the javascript onload & onunloadbody events.(www.restaurantebarocortico.com)
Now i'm learning jQuery, and i used the $(document).ready & $(window).unload to replace the old events, but the unload event isn't…

cusspvz
- 5,143
- 7
- 30
- 45
0
votes
4 answers
Report the time spent on a page to the server
Is it possible to report the time spend on a page back to server when the visitor leaves the page by closing the tab or the browser? Using Javascript.
And it will work on Firefox, Google Chrome, Safari, Opera, and IE8 (IE7 and 6 are not…

ilhan
- 8,700
- 35
- 117
- 201
0
votes
4 answers
Alternative for JavaScript onUnload
there is an alternative to the Javascript onUnload? I use JSP Jakarta Struts framework with a Servlets.
I must know, when is window closing, because not everyone clicks on Logout button.
How do you handle it in your applications?

wokena
- 1,301
- 4
- 15
- 17
0
votes
2 answers
addEventListener Problems in IE
Possible Duplicate:
MSIE and addEventListener Problem in Javascript?
I am trying to listen for a close event on a child popup window that is called by its parent page. The idea is for a user to be able to fill out a form and then using a popup…

Neil Young
- 556
- 10
- 23
0
votes
1 answer
how to keep page position in ajax/jquery interface
I am currently building a simple ajax interface for a booking and tracking from for use on the web.
The problem I have is that if the user hits the back button or the refresh button any unsaved data is erased and the page returns to its normal…

Sideshow
- 1,321
- 6
- 28
- 50
0
votes
2 answers
javascript event only on leaving site
I am creating my own simple stats to record which pages were read and for how long etc.
I then use an ajax call to record the info in a database, it's working using the window.ONBEFOREUNLOAD event, however this creates a database record for each…

crankshaft
- 2,607
- 4
- 45
- 77
0
votes
1 answer
Firefox hits the server before "onunload" function is called
i have a simple page running with asp.net mvc
When i click f5 or ctrl + f5 only in FF, server is hitted before "onunload" javascript function is called. it is working as expected in IE. Any knowhow?
Behaviour is like this:
1- Notify javascript…

Serdar
- 71
- 1
- 3
0
votes
1 answer
Google Maps and Internet Explorer 8 Error onunload="GUnload()
Everyone:
sorry that I am a noob and don't really no how to fix this:
I get an error in IE8 when I navigate AWAY from a page that has google maps on it.
Here are the error details
Webpage error details
Message: Object expected
Line: 37
Char: 1
Code:…

user1344629
- 3
- 2
-1
votes
1 answer
Calling an http request in an window:unload handler in Angular 5
I have an application which needs to make sure the user has saved their data when they accidentally close the browser (or tab). I have added a window:beforeunload handler to show the confirm dialog and a window:unload to call an http service call if…

KenPx
- 39
- 7
-1
votes
1 answer
Beforeunload Function is Not working And not updating the records after unload
Here is my code
function myfoo() {
$.ajax({
type: "POST",
url: "update.php",
dataType: 'json',
async: false,
data: {
Eventid: 1,
Seats: 'Seats'
},
success: function(r) {}
…

krish
- 120
- 14
-1
votes
1 answer
Access navigation form, cancel unload event
In the unload event of my Navigation Subform I have the following code.
If MsgBox ("Changes have not been locked and will be lost. Do you wish to proceed?", vbYesNo) = vbNo Then
Cancel = True
End If
When the user clicks one of the other…

Cloude
- 91
- 1
- 2
- 6