Open new broswer window on close
Posted: Thu Sep 18, 2003 6:48 am
Hi,
I am trying to open a new browser window when someone closes to main window of my site. This window logs the user out if they haven't click the LogOut button.
First off i thought this was easy and used the onUnload function to achieve this until i realised that onUnload means the current document that you are viewing on the site. This means that a new window is opened evertime you click a link within the site.
Unfortunately, there is no onClose function in Javascript.
So, how can i open a new window, only when i close the current window.
I have seen it done on online banking sites. The HSBC site does it, but i can't access that at the moment to "borrow" their code.
Any ideas?
Mark
I am trying to open a new browser window when someone closes to main window of my site. This window logs the user out if they haven't click the LogOut button.
First off i thought this was easy and used the onUnload function to achieve this until i realised that onUnload means the current document that you are viewing on the site. This means that a new window is opened evertime you click a link within the site.
Unfortunately, there is no onClose function in Javascript.
So, how can i open a new window, only when i close the current window.
I have seen it done on online banking sites. The HSBC site does it, but i can't access that at the moment to "borrow" their code.
Any ideas?
Mark