On load:
....
if (Explorer) {self.attachEve nt('onunload',s ayByeBye);}
else if (Netscape) {self.addEventL istener('onunlo ad',sayByeBye,t rue);}
else {/* just forget it */}
....
Then supposing you know when you want to refresh your site (and you should
for sure!):
Before refresh:
if (Explorer) {self.detachEve nt('onunload',s ayByeBye);}
else if (Netscape) {self.removeEve ntListener('onu nload',sayByeBy e,true);}
else {/* just forget it again*/}
Now do your refresh...
Simon Wigzell <si**********@s haw.ca> wrote in message
news:QS_cb.1541 4$O85.8622@pd7t w1no...
I'm using OnUnLoad in my body statement to redirect to a function to clean
things up if someone exits a form by closing it from outside the webpage
code - e.g. by not using the cancel or save and exit buttons I have
supplied but by clicking on the browser window top right X or closing it by
clicking with the right mouse button on the tray icon for the window. Unfortunately
it is also triggered by a refresh, which my web page does as part of it's
functionality. Is there not a way of only trapping "improper" exiting of a
web page? Thanks.