On Tue, 12 Jun 2001, Digital Strider wrote:

> Just use the onUnload event handler...

But it doesn't tell me *why* the unload is occurring. That's my problem.
The onunload event fires if a new URL is loaded, if the current page is
reloaded, or if the browser window is closed. I want to differentiate
between a page reload and a browser kill.

I doubt that it's possible to detect the difference, but I'd sure like
for somebody to show me otherwise.

> -----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

Reply via email to