PDA

View Full Version : Detecting multiple closed windows???


jwendel
07-16-2002, 05:44 PM
I have 4 windows open of the same application, and I want to detect whether the window has closed, but I want to actively check whether it is

closed at the time they close it, not after the fact that they closed it. Then when they close the last window of the app, they get a msg asking

them if they want to logoff. Can anyone help out with this. Can the document.links[n].propertyName work???? :thumbsup:

Thanks for any help
jer

ShriekForth
07-16-2002, 05:59 PM
Just a quick thought, but couldn't you use onUnload to send a message back to the parent window telling it that this one has closed? Then just keep track of the 4 windows states in an array, or just a simple counter that shows a warning when it reaches 0?

<body onUnload="opener.imClosing('1')">

This of course only works if they don't close the parent window. In that case I guess you could close the children window if you are worried about security or something.

ShriekForth