Detecting Window Closed

They have: 15 posts

Joined: Jun 2000

Hi all,

1. can somebody tells me how to detect if one has closed a window?

Thanks in advance!

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi,

Never had to, but...

1) You can set a var with onUnload in the body tags (unreliable, though)
2) if (windowName.document.formname.elementname.value == someValue)
The above presumes that if the values are not equal, then the window was closed. Don't really know if it works, but it sounds logical.

Vinny

------------------
my site:GrassBlade: cut&paste javascript
moderator at:The Javascript Place
Javascript City

Where the world once stood
the blades of grass cut me still

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

They have: 15 posts

Joined: Jun 2000

Thousand Thanks to all of you!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.