On Tue, 12 Jun 2001 [EMAIL PROTECTED] wrote:
> Sure, just load the URL into a variable, then do a if(oldURL ==
> window.location.href) { do some fun stuff }
>
> Believe this will work.. haven't tried it.. but it's atleast an idea to
> bounce offa
I had tried that already, hoping that the URL property of the window
object would get cleared on a window destroy, or reset before a page
load, but it turned out not to be the case.
So today I tried printing all of the properties of the window object
(via an alert) and comparing the results. Here's what I found:
In IE, there are properties called screenTop and screenLeft. When a page
reload occurs (a refresh, going to a new URL, hitting the Back or
Forward buttons), these will contain the actual browser window
coordinates, as expected. BUT, if you are exiting the browser (click the
'X', File/Close, ALT-F4, etc), these values are changed. In all my tests
so far, I've gotten screenTop=10118 and screenLeft=10004. I don't know
the significance of those particular values, but I should just be able
to check for window.screenTop > 10000 to tell the difference between a
regular window.onunload and a browser death.
In Netscape, the onUnload event isn't called when a window is killed. If
someone knows of an event that *is* called, I'd appreciated it if you'd
let me know. I'm not too worried about that, since most of my
application's users will be using IE, but a Netscape solution would
still be good to have.
--
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