470,602 Members | 1,646 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

How To Execute Script On Browser Close Event

Hi

I would like to update the status of users of my site. I am not getting any clue as to how execute a script on close event of the browser.

I have tried one thing that is I have used to call popup to execute it on unload of the page. there are 2 problems that window.open() is not working firefox and also I have to make the changes to more than 100's of pages.

So Please if anyone has Idea or can help me It will be aprreciable.

Thanks for all your support


Regards
Hemal Jivani
Nov 5 '07 #1
2 2387
Atli
5,058 Expert 4TB
Hi Hemal.

There is no reliable way of capturing when the user leaves your page or closes his browser. My advice would be to design your web so that it does not need to rely on such things.

If it is possible, it would be some sort of JavaScript, so I'm going to move this thread over to the JavaScript forums, where the JavaScript experts are more likely to find it.
Nov 5 '07 #2
acoder
16,027 Expert Mod 8TB
What does the script do? There may be an alternative.

You could use onbeforeunload, but it's not supported in Opera.
Nov 5 '07 #3

Post your reply

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

Similar topics

8 posts views Thread by Arun Seetharam | last post: by
3 posts views Thread by Lyle Fairfield | last post: by
1 post views Thread by Rob | last post: by
6 posts views Thread by =?Utf-8?B?UGF1bA==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.