Free ExitSplash alike script [Free Script]
This is my version of ExitSplash. I've wrote it myself, when I saw the cost of exitsplash.
Okay, here we go.
Place this code between the <head> tags of your page:
<script type="text/javascript"> var exit=true; function confirmExit() { if(exit) location.assign('special.html'); if(exit) return "***********************************************nn W A I T ! ! !nn WHY ARE YOU LEAVING?nn THIS OFFER IS *RISK FREE* REMEMBER?nn YOU HAVE OUR 60 DAYS MONEY BACK GUARANTEE!nn***********************************************"; } </script>
return"" - you put your exit script message here. This is my default message I use for my pages. Some work needs to be done here. I haven't made fancy Javascript text editor that would turn your message into the code, so you will need to manually set up your message.
\n - this stands for a break line (like <br /> in HTML)
Now put this code instead of your normal <body> tag:
<body onbeforeunload="return confirmExit()">
And finally, we want to disable script sometimes. For example, when customer hits add to cart button, we don't want him to see our special offer with a discount, since he is already purchasing, right?
So you can disable this script on any link by adding little code to your anchor code:
<a href="YOURLINK" onclick="exit=false">Anchor text</a>
<a href="YOURLINK"><img src="IMG_LOC" onclick="exit=false"></a>
Create a Business & Life That's Meaningful.