Hello,
Ok so I have searched for weeks now and haven’t found exactly what I am looking for yet so I decided to try and ask in this forum.
So I need a pop-up to be displayed when someone tries to exist a particular page on a website (I dont want to do this my boss made me, I hate pop-ups)
The problem is if they hit the back button or refresh button and they are still on our site the pop-up gets displayed. We only want it to appear if they exit our domain. If anyone knows how to do this I would greatly appreciate your help. Thanks in advance, below is the code that I have so far.
<html>
<head>
<title></title>
<script language=”JavaScript”>
<!–
ok=1
function open_on_departure(url,name)
{
if (ok)
popupWin = window.open(‘
}
// –>
</script>
</head>
<body onLoad=”leaving=true” onUnload=”if (leaving) open_on_departure()”>
</body>
</html>