|
Use the onunload event of the document body to fire your javascript method to open the new window.
For example,
In the head tag create a method to open the window,
w = window.open("win_url", "win_name", 'width=150,height=100')
In your body tag, set the onunload event handler to your method,
< body onunload="yourmethod()" >
When the user attempts to leave your page, a new window is displayed.
You will need to look up all the features available for a new window to set the window to appear the way you want.
Hope that helps.
|