Forum Moderators: mack
That said, I spent a lot of time on this not too long ago. My client really wanted a particular window to pop up ONLY if someone closed the browser and NOT when they clicked a link or anything else...and the customer is always right, right?
The end result of my search/research is that you can mimick it to a point, but realistically it's not possible. The problem that I found is that any script you're running in the document to monitor when the window is closed is killed when the window is closed. It would be like asking you to call me when you die. You can't call until you're dead cause until then you haven't died...but can you call me when you're dead? That would be a neat trick.
For information on how to mimick it (i.e. keep the links from triggering the pop-up) search the JavaScript forum. There are a couple of examples there.