473,320 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 1904
Dormilich
8,658 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

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

Similar topics

1
by: abhay | last post by:
Hello all, I want to trap the window.close() event when the user clicks on the close button of the browser using javascript. Can anyone shed light on this problem ? Thanks in advance. ...
3
by: Coder Coder | last post by:
<script for="window" event="onbeforeunload"> alert('Im closing'); </script> http://www.xpcoder.net
2
by: Tony Clarke | last post by:
This is brobably a newbie question but is there anyway to actually stop a windows close event and stop a user from exiting a page the wrong way. I know you can use the onbeforeUnload to display a...
1
by: KS | last post by:
Is it possible to somehow capture that the user is closing the browser by clicking the X at the top right corner? I want to run a javascript when that happends, if possible.
4
by: feng | last post by:
Hi, In our asp.net app, we need to capture the event when user close the browser window by clicking on the "x" button. But it doesn't seem to be as easy as it sound. Can someone show me how to...
5
by: jimmy | last post by:
Hi all, I want to capture the event when the browser's close button is clicked in an html page. I tried using the event.ClientX and event.ClientY property in the body unload event, and this...
3
by: Marco A. Cruz Quevedo | last post by:
Hi! I am a javascript newbie. I want to make a capture window in *standalone* (in a *.js file) javascript, much in the same way as the VBscript inputbox() function. I can make it inside a *.html...
4
by: appandairajc | last post by:
Hi All, window.close() is not working in firefox browser. Can anybody tell me about this problem? Thanks & Regards, Appandairaj C
5
by: agarwalsunitadhn | last post by:
hi.... Currently i am working in a project where i have to maintain the time in between the user logged in. but i got a problem when the user close the application through browser window's close...
1
by: athirukk | last post by:
In my C++ windows application, I have a messagebox (kinda About) and has only X button in the title bar. I want to close this window when the user hits X button. Any pointer to this will be helpful....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.