View Single Post
Old 04-19-2004, 07:11 AM  
Coyote
Drinker of Scotch
 
Industry Role:
Join Date: May 2003
Location: Texas
Posts: 242
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.
Coyote is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote