List Building (Exit Pop Up)

7 replies
I searched for a few days trying to find a free exit pop up that worked. I finally found one and wanted to share it, in case someone else was in my shoes. I know there are exit pop up scripts out there, but not everyone has the $50-$100 to buy one at first. Just replace the BOLD sections with your info and place before the </body> tag in your HTML page. This will redirect to your new page before they even have a chance to close the pop up, giving your prospective subscriber/buyer a chance to see your "new" offer.

<script type="text/javascript" language="javascript">
var exitsplashmessage = "***********************************************\n W A I T ! ! !\n!\nTake An INSTANT $10 Off Get The Entire System Plus Bonuses For JUST $7!!\n******************************************* ****";
var exitsplashpage = 'yourURL.com';
function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); }
function addClickEvent(a,i,func) { if (typeof a[i].onclick != 'function') { a[i].onclick = func; } }
var theDiv = '<div id="ExitSplashDiv" style="display:block; width:100%; height:100%; position:absolute; background:#FFFFFF; margin-top:0px; margin-left:0px;" align="center">';
theDiv = theDiv + '<iframe src="'+exitsplashpage+'" width="100%" height="100%" align="middle" frameborder="0"></iframe>';
theDiv = theDiv + '</div>';
theBody = document.body; if (!theBody) {theBody = document.getElementById("body"); if (!theBody) {theBody = document.getElementsByTagName("body")[0]; } }
var PreventExitSplash = false;
function DisplayExitSplash(){ if(PreventExitSplash == false){ window.scrollTo(0,0); PreventExitSplash=true; divtag = document.createElement("div"); divtag.setAttribute("id","ExitSplashMainOuterLayer "); divtag.style.position="absolute"; divtag.style.width="100%"; divtag.style.height="100%"; divtag.style.zIndex="99"; divtag.style.left="0px"; divtag.style.top="0px"; divtag.innerHTML=theDiv; theBody.innerHTML=""; theBody.topMargin="0px"; theBody.rightMargin="0px"; theBody.bottomMargin="0px"; theBody.leftMargin="0px"; theBody.style.overflow="hidden"; theBody.appendChild(divtag); return exitsplashmessage; } }
var a = document.getElementsByTagName('A'); for (var i = 0; i < a.length; i++) { if(a[i].target !== '_blank') {addClickEvent(a,i, function(){ PreventExitSplash=true; });} else{addClickEvent(a,i, function(){ PreventExitSplash=false;}); } }disablelinksfunc = function(){var a = document.getElementsByTagName('A'); for (var i = 0; i < a.length; i++) { if(a[i].target !== '_blank') {addClickEvent(a,i, function(){ PreventExitSplash=true; });} else{addClickEvent(a,i, function(){ PreventExitSplash=false;}); }
addLoadEvent(disablelinksfunc);
disableformsfunc = function(){ var f = document.getElementsByTagName('FORM'); for (var i=0;i<f.length;i++){ if (!f[i].onclick){ f[i].onclick=function(){ PreventExitSplash=true; } }else if (!f[i].onsubmit){ f[i].onsubmit=function(){ PreventExitSplash=true; } } } }
addLoadEvent(disableformsfunc);
window.onbeforeunload = DisplayExitSplash;</script>


Found this script in the forum here: http://www.warriorforum.com/main-int...ript-code.html
#building #exit #list #pop #redirect
  • Profile picture of the author Pritom
    Thanks mate.. )
    {{ DiscussionBoard.errors[9241531].message }}
    • Profile picture of the author LearnIM
      Here is another great one.

      <script language="javascript">
      (function() {
      setTimeout(function() {
      var __redirect_to = 'http://google.com';//

      var _tags = ['button', 'input', 'a'], _els, _i, _i2;
      for(_i in _tags) {
      _els = document.getElementsByTagName(_tags[_i]);
      for(_i2 in _els) {
      if((_tags[_i] == 'input' && _els[_i2].type != 'button' && _els[_i2].type != 'submit' && _els[_i2].type != 'image') || _els[_i2].target == '_blank') continue;
      _els[_i2].onclick = function() {window.onbeforeunload = function(){};}
      }
      }

      window.onbeforeunload = function() {
      setTimeout(function() {
      window.onbeforeunload = function() {};
      setTimeout(function() {
      document.location.href = __redirect_to;
      }, 500);
      },5);
      return 'WAIT BEFORE YOU GO! CLICK THE *STAY ON THIS PAGE* OR *CANCEL* BUTTON RIGHT NOW! I HAVE SOMETHING VERY SPECIAL FOR YOU.';
      }
      }, 500);
      })();
      </script>
      {{ DiscussionBoard.errors[9241881].message }}
      • Profile picture of the author beasty513
        This is what I use:
        <script language="javascript">(function() {
        var __redirect_to = ' put redirect URL here'
        var _tags = ['button', 'input', 'a'], _els, _i, _i2;
        for(_i in _tags) {
        _els = document.getElementsByTagName(_tags[_i]);
        for(_i2 in _els) {
        if((_tags[_i] == 'input' && _els[_i2].type != 'button' && _els[_i2].type != 'submit') || _els[_i2].target == '_blank') continue;
        _els[_i2].onclick = function() {window.onbeforeunload = function(){};}
        }
        }
        window.onbeforeunload = function() {
        setTimeout(function() {
        window.onbeforeunload = function() {};
        setTimeout(function() {
        document.location.href = __redirect_to;
        }, 500);
        },5);
        return '***************************************nn WAIT! BEFORE YOU GO...nn CLICK THE *CANCEL* OR *STAY ON THIS PAGE* RIGHT NOW!nn I HAVE SOMETHING VERY SPECIAL FOR YOU!nn***************************************';
        }
        })();
        </script>
        </body></html>
        {{ DiscussionBoard.errors[9244920].message }}
  • Profile picture of the author chrisbaby
    Thanks man, you just saved me big time. My previous script keep popping up even when someone entering their email @-@

    Originally Posted by Redskins73 View Post

    I searched for a few days trying to find a free exit pop up that worked. I finally found one and wanted to share it, in case someone else was in my shoes. I know there are exit pop up scripts out there, but not everyone has the $50-$100 to buy one at first. Just replace the BOLD sections with your info and place before the </body> tag in your HTML page. This will redirect to your new page before they even have a chance to close the pop up, giving your prospective subscriber/buyer a chance to see your "new" offer.

    <script type="text/javascript" language="javascript">
    var exitsplashmessage = "***********************************************n W A I T ! ! !n!nTake An INSTANT $10 Off Get The Entire System Plus Bonuses For JUST $7!!n******************************************* ****";
    var exitsplashpage = 'yourURL.com';
    function addLoadEvent(func) { var oldonload = window.onload; if (typeof window.onload != 'function') { window.onload = func; } else { window.onload = function() { if (oldonload) { oldonload(); } func(); }
    function addClickEvent(a,i,func) { if (typeof a[i].onclick != 'function') { a[i].onclick = func; } }
    var theDiv = '<div id="ExitSplashDiv" style="display:block; width:100%; height:100%; position:absolute; background:#FFFFFF; margin-top:0px; margin-left:0px;" align="center">';
    theDiv = theDiv + '<iframe src="'+exitsplashpage+'" width="100%" height="100%" align="middle" frameborder="0"></iframe>';
    theDiv = theDiv + '</div>';
    theBody = document.body; if (!theBody) {theBody = document.getElementById("body"); if (!theBody) {theBody = document.getElementsByTagName("body")[0]; } }
    var PreventExitSplash = false;
    function DisplayExitSplash(){ if(PreventExitSplash == false){ window.scrollTo(0,0); PreventExitSplash=true; divtag = document.createElement("div"); divtag.setAttribute("id","ExitSplashMainOuterLayer "); divtag.style.position="absolute"; divtag.style.width="100%"; divtag.style.height="100%"; divtag.style.zIndex="99"; divtag.style.left="0px"; divtag.style.top="0px"; divtag.innerHTML=theDiv; theBody.innerHTML=""; theBody.topMargin="0px"; theBody.rightMargin="0px"; theBody.bottomMargin="0px"; theBody.leftMargin="0px"; theBody.style.overflow="hidden"; theBody.appendChild(divtag); return exitsplashmessage; } }
    var a = document.getElementsByTagName('A'); for (var i = 0; i < a.length; i++) { if(a[i].target !== '_blank') {addClickEvent(a,i, function(){ PreventExitSplash=true; });} else{addClickEvent(a,i, function(){ PreventExitSplash=false;}); } }disablelinksfunc = function(){var a = document.getElementsByTagName('A'); for (var i = 0; i < a.length; i++) { if(a[i].target !== '_blank') {addClickEvent(a,i, function(){ PreventExitSplash=true; });} else{addClickEvent(a,i, function(){ PreventExitSplash=false;}); }
    addLoadEvent(disablelinksfunc);
    disableformsfunc = function(){ var f = document.getElementsByTagName('FORM'); for (var i=0;i<f.length;i++){ if (!f[i].onclick){ f[i].onclick=function(){ PreventExitSplash=true; } }else if (!f[i].onsubmit){ f[i].onsubmit=function(){ PreventExitSplash=true; } } } }
    addLoadEvent(disableformsfunc);
    window.onbeforeunload = DisplayExitSplash;</script>


    Found this script in the forum here: http://www.warriorforum.com/main-int...ript-code.html
    {{ DiscussionBoard.errors[9390566].message }}
  • {{ DiscussionBoard.errors[9391014].message }}
  • Profile picture of the author Mike Hersh
    If you're using this code make sure that people can actually navigate away of they REALLY want to. Some exit pops are asking if you want to leave or stay, and they still keep you on the page even though you wanted to exit. That can lead to complaints, and you don't want people to suffer.

    That said, an exit pop is a great way to get more subscribers, just make sure that they can really exit of they want.
    {{ DiscussionBoard.errors[9391206].message }}
  • Profile picture of the author rob587
    Why not just use SumoMe.com? Its free.
    {{ DiscussionBoard.errors[9391262].message }}

Trending Topics