connoisseur.infotech@gmail.com wrote:
> We have a website we need to open popup under following conditions
> 1) When user close the browser either via X button or alt + f4, file ->
> Close
> 2) when he changes URL and goes to some other site.
> 
> 3) but it should not open the popup window till the user is on same
> website.
> 
> we have tried lot of combinations but till date nothing there.
> 
> We look forward for your help to resolve this issue.
> this is now becoming big for us and for our client
> thanks
> Parminder
> Connoisseur Infotech Pvt. Ltd.
> <a href="http://www.econnoisseur.com" target="_blank"> Complete web
> development and web designing company http://www.econnoisseur.com/
> </a>

You may use the unload event to open the popup. When a page gets loaded, 
step through all links and add a javascript click handler which will set 
a global variable. Check for that variable in your unload handler. If it 
is not present, show the popup.

Daniel

Fup 2 comp.lang.javascript