469,330 Members | 1,271 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,330 developers. It's quick & easy.

To capture Window close event in Javascript.

How to capture window close event in case of Mozilla Browser.?
I used "onbeforeunload" event which of no use..? This event got triggered even when we refresh the page.

Please let me know If you have solution.

Thanks,
Swarna
Oct 3 '11 #1
1 1833
Dormilich
8,651 Expert Mod 8TB
This event got triggered even when we refresh the page.
of course. if you refresh a page, you close it and then open it again (the fact that the URL stays the same doesn’t matter here).

personally I doubt there is such an event (at least I didn’t find an event in the HTML5 specs that matched)
Oct 3 '11 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by abhay | last post: by
3 posts views Thread by Coder Coder | last post: by
2 posts views Thread by Tony Clarke | last post: by
1 post views Thread by KS | last post: by
5 posts views Thread by jimmy | last post: by
3 posts views Thread by Marco A. Cruz Quevedo | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.