Please HELP - Need Exit Pop Up Code

4 replies
I have been trying to do this for 3 hours, and no code I found works.

I have an HTML page created via Hostgator.

1. All I want is to add an Exit Splash Type Pop Up when someone tries to exit the page that will say, Wait Don;t Leave....blah blah" with a Stay On Page Link and then it redirects to another page on my site.

2. Also, the script must be disabled when clicking Buy Buttons, or specific urls as this is a sales page.

So, it should only work on clicking X for exit.

This is the code I have, but it works in Firefox, expect my custom text doesn't show, but won't work in Chrome at all, asks to stay or leave page, but if I click stay never redirects to the new page??

The page is http://internetslayers.com/test.html

Code:
<head>
<script type="text/javascript">
var exit=true;
function confirmExit()
{
if(exit)
location.assign('http://internetslayers.com/free-plr-articles.html');
if(exit)
return "STAY ON PAGE TO GET 10 FREE PLR ARTICLES + 3 BONUSES";
}
</script>
</head>
<body onbeforeunload="return confirmExit()"><a href="https://www.jvzoo.com/b/15355/81321/1"><img src="http://i.jvzoo.com/15355/81321/1" onclick="exit=false" alt="Weight
Loss Methods PLR eBook + 136 Pieces Of Quality Fresh Content" border="0" /></a>
</body>
</html>
Anyone?
#code #exit #pop

Trending Topics