The window object in JavaScript has an event handler called onload . When this event handler is used, the entire page and all of its related files and components are loaded before the function listed in the onload event handler is executed, hence the term "on load."
Questions tagged [window.onunload]
77 questions
0
votes
0 answers
onbeforeunload / onunload when user reset/shut down computer
I have a field in my database that register if a window is open.
I also have a onbeforeunload / onunload function that delete this cell when user close the window.
The problem is when the user "reset" / "shut down" the computer that the query is not…

Sergio HV
- 49
- 7
0
votes
0 answers
onunload of subpage in ie11
I know that there are similar questions here, but i couldn't find any that involve a subpage being closed.
the code has a link, "email1", which opens a subpage, the subpage has a form that is used to update some hidden values on the start page using…

Bobert123
- 103
- 8
0
votes
2 answers
variable gets lost when using window.onload
I have the following script, however the variable "ClientID" somehow gets lost (undefined). I'm wondering if this is because of the "window.load" statement? and is there anything I can do to make sure the ClientID variable is carried over to this…

Ke.
- 2,484
- 8
- 40
- 78
0
votes
1 answer
Parent iframe won't reload when popup closes
I have a function in parent iframe.
var reloadFrameWindow = function() {
"use strict";
var doc, myFrame, keyElem, url;
doc = document;
myFrame = doc.getElementById("myFrame");
keyElem = doc.getElementById("key");
if…

Chun ping Wang
- 3,879
- 12
- 42
- 53
0
votes
2 answers
Browser agnostic hook to send asynchronous request upon window.onunload
When a user closes a browser tab or window we want to implement a hook to send an http delete request.
My question is - can
window.onunload
or
window.onbeforeunload
guarantee the sending of AJAX requests or is there no such guarantee?
Now, we…

Alexander Mills
- 90,741
- 139
- 482
- 817
0
votes
1 answer
on Window.onload form is not loading
on Window.onload form is not loading
My code is :