I made a little mistake in my first post. screenLeft is the property for the x coordinate while screenTop is the property for the y coordinate. I stated it as if screenTop did both.
screenTop in the link you show above returns the number of pixels from the top of the monitor display screen the content window of the IE page starts.
For instance, if my IE window is flush with the top of my monitor display screenTop reports a value of 128, meaning there are 128 pixels between the top of the monitor display and where the content window begins. The space in between is taken up by the top of the IE browser window and the toolbars. If I move the window down from the top edge of the monitor display the value of screenTop increases by the same number of pixels.
In the case of a line like this:
< body onunload = "if (screenTop > 9999) alert('Closing');">
When the page begins to unload the code says:
If the content window starts at more than 9999 pixels from the top of the screen then send an alert.
Realistically, your content window will not be that far down the screen as your monitor is not going to display that many pixels anyway. Most likely the person using this code was setting his window position to be way below the actual displayable screen. Probably the window was not meant to be visible but to remain open for other reasons and when the page is closed it tests if the page is in it's off-screen position and sends the alert.
For your use you do not need the if statment, just use something like:
<body onunload="alert('closing');">
Again, the screenTop property is an IE only property. Using it with other browsers will not get you the same results because screenTop would not have a value so the if statement would not evaluate and trigger the alert.
It's hard to think outside the box when I'm trapped in a cubicle.
In an increasingly self-focused society it is important to recognize the unselfish actions of others so they will feel encouraged to continue such actions. Please give acknowledgement to those who aid you whether it is waving to the person who let you out in traffic, tha