I'm using OnUnLoad in my body statement to redirect to a function to clean\nthings up if someone exits a form by closing it from outside the webpage\ncode - e.g. by not using the cancel or save and exit buttons I have supplied\nbut by clicking on the browser window top right X or closing it by clicking\nwith the right mouse button on the tray icon for the window. Unfortunately\nit is also triggered by a refresh, which my web page does as part of it's\nfunctionality. Is there not a way of only trapping "improper" exiting of a\nweb page? Thanks.