Exit Pop Up Script that will work in Chrome / Firefox / IE?

12 replies
  • WEB DESIGN
  • |
hey guys..

Does anyone have an exit pop up script that will pop up when a user tries to close a page? I will be using this on HTML pages (not wordpress)


I see a lot of people recommend Exitsplash.com ... I don't know, something seems weird about paying $67 for a few lines of code... I do not need all the extras they offer.


Does anyone have or willing to make a simple working solution?


Thanks
#chrome #exit #firefox #pop #script #work
  • Profile picture of the author David V
    Originally Posted by MarketingVet09 View Post

    hey guys..
    Does anyone have an exit pop up script that will pop up when a user tries to close a page?

    I see a lot of people recommend Exitsplash.com ... I don't know, something seems weird about paying $67 for a few lines of code... I do not need all the extras they offer.

    Does anyone have or willing to make a simple working solution?

    Thanks

    There are many scripts like you ask for, even right here in the forum...
    http://www.warriorforum.com/search.p...rchid=21007540
    The thing lacking in really simple scripts (that do work like you ask) is control.
    Controlling on a per page basis, timing, the way it looks, etc...
    You can't do that with a few lines of code.

    Ummmm.....as far as ExitSplash, it's definitely not a few lines of coding, your paying for more then the detection of mouse movement to exit.

    But if you want to piece together a solution yourself, here are a few links that could steer you in the right direction.
    If your on WordPress you'll need to integrate these yourself or create your own plugin.

    A Working Exit Popup » KBeezie
    Exit Pop-up Script | Wordpress Harmony
    Jquery Exit Popup - Stack Overflow
    WordPress › Pinoy Pop Up on Exit « WordPress Plugins (likely needs to be updated for latest WP version if that's what your using)


    Again, search here in the WF, this question has been asked many, many times.
    {{ DiscussionBoard.errors[7879734].message }}
  • Profile picture of the author TopOfTheMornin
    Sneaky affiliate for wordpress is pretty good too. wickedcoolplugins.com/the-plugins/sneaky-affiliate/
    Signature
    How to Drive Traffic To Your Website
    Free + Paid Reports & Training Courses

    SEOalaCarte.com
    ********************
    Cheers, Jonathan Sherman
    {{ DiscussionBoard.errors[7879754].message }}
  • Profile picture of the author MarketingVet09
    Hey Dave


    That's the thing, it's been asked a ton, I've even asked it in another section, but everytime the script is out of date, doesn't work on certain browsers, or has some faults.


    I was just hoping someone here, perhaps a programer, has one that is CURRENT that will work on all 3 browsers (and that I don't need to pay $67 for).



    When I say a few lines of code, it is a few lines for my purposes. I don't need extravagant pop ups with colors, or mouse detection or anything fancy like that.... I know exit splash offers a lot of this stuff, the point is I don't need it... I just need the BASIC pop up that pops up when someone hits exit on a page....


    like the one on these sites:

    http://magneticmessaging.com/sexy

    37 Critical Items



    If anyone has something current please share!


    Thanks
    {{ DiscussionBoard.errors[7879755].message }}
  • Profile picture of the author David V
    If I remember right, someone asked this question within the last 100 posts, maybe a few days ago, and a script was posted for the answer.
    I can't remember the post title, but a search and sort by date might find it.

    As far as changing with the browser versions, that's going to happen and changes need to be made to keep up with those changes. (even a paid plugin would have to update if needed)
    Built in blockers are becoming really common now.
    If I used exactly what your asking for I'd give you the code, but I do not.

    EDIT: Your seeing less and less of these scripts then you did several years ago because they have been abused and they irritate most users, so the popularity has dropped off somewhat.

    That example site you gave is using this:

    Code:
    <script>
      var clicky_custom = {};
      clicky_custom.split = {
        name: 'Sales Letter',
        version: 'Exit Pop Redirect Page'
      }
    </script>

    Dig into their source code a little deeper and you may find what you seek.
    {{ DiscussionBoard.errors[7879783].message }}
  • Profile picture of the author SmallBizWebsites
    This is a website design forum and IMHO having an exit pop-up of any kind which tries to trap the visitor so they can't leave, or pleads with them to stay, and so on is bad web design. Period.

    It is intrusive, it is a form of nagging, and it leaves a bad taste in the mouth of most website visitors. If I decide to leave your web page, it is because I found nothing on it which would convince me to stay.

    Instead of using exit popups as a ploy to keep visitors on your site, you should have a compelling web design which is effective at conversions. Adding an exit pop-up to a lousy web site design is not a substitute.
    {{ DiscussionBoard.errors[7887369].message }}
    • Profile picture of the author ronr
      If you are sending traffic to a page and they don't do what you want, buy, optin etc. you have nothing to lose to make one last attempt when they leave since they won't be back anyway.

      Originally Posted by SmallBizWebsites View Post

      This is a website design forum and IMHO having an exit pop-up of any kind which tries to trap the visitor so they can't leave, or pleads with them to stay, and so on is bad web design. Period.

      It is intrusive, it is a form of nagging, and it leaves a bad taste in the mouth of most website visitors. If I decide to leave your web page, it is because I found nothing on it which would convince me to stay.

      Instead of using exit popups as a ploy to keep visitors on your site, you should have a compelling web design which is effective at conversions. Adding an exit pop-up to a lousy web site design is not a substitute.
      {{ DiscussionBoard.errors[8149670].message }}
  • Profile picture of the author Andrew H
    You just use a modal box and the jQuery mouseleave function. It's elementary.

    .mouseleave() | jQuery API Documentation

    $('body').mouseleave(function() {
    // fire your modal
    });
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[7887553].message }}
  • Profile picture of the author newbim
    A previous post of mine may help, like ES, but free.
    http://www.warriorforum.com/website-...free-code.html
    Signature
    If what I said helps, let me know, throw me a 'thanks'.
    {{ DiscussionBoard.errors[7891709].message }}
  • Profile picture of the author newbim
    NB. Originally posted when it was still "ok" to use it. Can't say I agree with or disagree to be honest though.
    Signature
    If what I said helps, let me know, throw me a 'thanks'.
    {{ DiscussionBoard.errors[7891713].message }}
    • Profile picture of the author seoparadise
      Hi guys,

      here is a script that works in all browsers. Put this code in the bottom of your html page (before de tag </HTML>)

      var ExitPopupmessage = "YOUR MESSAGE HERE';
      var ExitPopuppage = 'YOUR URL HERE';

      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="ExitPopupDiv" style="display:block; width:100%; height:100%; position:absolute; background:#FFFFFF; margin-top:0px; margin-left:0px;" align="center">';
      theDiv = theDiv + '<iframe src="'+ExitPopuppage+'" 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 PreventExitPopup = false;

      function DisplayExitPopup(){
      if(PreventExitPopup == false){
      window.scrollTo(0,0);
      window.alert(ExitPopupmessage);
      PreventExitPopup=true;
      divtag = document.createElement("div");
      divtag.setAttribute("id","ExitPopupMainOuterLayer" );
      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 ExitPopupmessage;
      }
      }

      var a = document.getElementsByTagName('A');
      for (var i = 0; i < a.length; i++) {
      if(a[i].target !== '_blank') {addClickEvent(a,i, function(){ PreventExitPopup=true; });} else{addClickEvent(a,i, function(){ PreventExitPopup=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(){ PreventExitPopup=true; });} else{addClickEvent(a,i, function(){ PreventExitPopup=false;});}
      }
      }

      hideexitcancelbuttonimage = function(){
      document.getElementById('ExitCancelButtonImageDiv' ).style.display='none';
      }
      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(){ PreventExitPopup=true; } }else if (!f[i].onsubmit){ f[i].onsubmit=function(){ PreventExitPopup=true; }
      }

      addLoadEvent(disableformsfunc);
      window.onbeforeunload = DisplayExitPopup;
      {{ DiscussionBoard.errors[8108234].message }}
      • Profile picture of the author richinca
        Originally Posted by seoparadise View Post

        Hi guys,

        here is a script that works in all browsers. Put this code in the bottom of your html page (before de tag </HTML>)
        Does this need to be between <script> tags?
        Signature
        {{ DiscussionBoard.errors[8145854].message }}
      • Profile picture of the author LocalShanti
        Fantastic Script... only it has a syntax error on the final diableformsfunc: it needs 2 more closing brackets "} }"

        So it should end something like:

        PreventExitPopup=true; } } }
        }

        I added that and it works like a charm!

        Thanks for the script!
        {{ DiscussionBoard.errors[10921131].message }}

Trending Topics