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
1 answer
Set focus on unloading window at onunload
I have got a confirm dialog at the onunload event. It works well but there is only one problem: the window loses at onunload the focus and passes it automatically to the parent. But since there is still the confirm dialog going on I don't want to…

Manuel Zelenka
- 1,616
- 2
- 12
- 26
0
votes
1 answer
How to Overcome the default alert message in window.onbeforeunload
I use window.onbeforeunload i have my own custom alert message but along with my message some default message is also showing in that confirm window. I need only my custom message.