Hi,

Can anyone tell me how to determine if the browser window is being closed (either by alt-F4, File->Close, or clicking the X). I have tried using the window.onunload event but because this fires when navigating to another page that is no use.

Many thanks in advance