Exit pop

admin

Administrator
Staff member
Having an issue with exit pop. I need this to only pop if user goes to another domain or closes browser window. Not when they click back or navigating through the domain.

script:

<SCRIPT LANGUAGE="Javascript">
<!--
var pc_exitpop_suppress = 1;
var PopUpFlag = true;

function popit() {
var popup_win = window.open('new_page.html','exit_popup','titlebar=no,toolbar=no,location=no,menu=no,directories=no, resizable=no,status=no,scrollbars=no,width=400,height=345,top=300');
return true;
}

function suppress() {
PopUpFlag=false;
return true;
}

function PopUpWindow () {

if(PopUpFlag) { popit(); }

}
//-->
</SCRIPT>



<body onUnload="PopUpWindow()" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">

on every link:
<a OnClick="suppress();" href=http://www.webdeveloper.com/forum/archive/index.php/"/index.shtml">
 
Back
Top