Just use the onUnload event handler...
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Dougal
Campbell
Sent: Tuesday, June 12, 2001 9:00 AM
To: [EMAIL PROTECTED]
Subject: [Dynapi-Help] OT: window destruction detection?
This isn't a DynAPI specific question, but maybe somebody here can
help...
Is there any way in Javascript for a document to detect whether it's
being unloaded because the user is going to a new URL, or because he
closed the window?
I'm hoping to be able to call a "logout" function on my server if they
close the window, but not on a regular document onunload event due to a
new URL loading. I was hoping that the window.closed property would
work, but it doesn't seem to get set until after the window has been
"fully" destroyed.
Does anyone know a way to detect this?
--
Ernest MacDougal Campbell III, MCP+I, MCSE <[EMAIL PROTECTED]>
http://dougal.gunters.org/ http://spam.gunters.org/
Lumber Cartel Unit #1654 (tinlc): http://come.to/the.lumber.cartel/
This message is guaranteed to be 100% eror frea!
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.256 / Virus Database: 129 - Release Date: 5/31/2001
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-help