Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
94
rated 0 times [  98] [ 4]  / answers: 1 / hits: 19340  / 15 Years ago, fri, july 17, 2009, 12:00:00

Is there a way to trap the browser closing event from JavaScript? I don't want to do this in Page Unload event or anything. It must be handled on clicking the browser close button.



Is it possible?


More From » javascript

 Answers
30

No. You only have onbeforeunload event, available as raw javascript (jquery doesn't include this event).



If you want to try it, try to post here an answer and, without pressing post your answer try to close the browser window.



This is the closest way to access the close window event.


[#99111] Monday, July 13, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mariann

Total Points: 201
Total Questions: 133
Total Answers: 107

Location: Czech Republic
Member since Thu, Aug 11, 2022
2 Years ago
;