Javascript Exit Popup Code: Please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BigRod
    Confirmed User
    • Apr 2005
    • 3685

    #1

    Javascript Exit Popup Code: Please

    Hello GFY I am looking for a exit popup script that works. If it works in both IE and Firefox thats a plus.

    Your help is greatly appreciated!

    Thanks ahead of time
    Rod Macdonald
    Mainstream Ad Agency Owner
    ICQ: 607306
  • BigRod
    Confirmed User
    • Apr 2005
    • 3685

    #2
    Bump....
    Rod Macdonald
    Mainstream Ad Agency Owner
    ICQ: 607306

    Comment

    • fetishblog
      Confirmed User
      • Sep 2005
      • 5995

      #3
      Code:
      <SCRIPT LANGUAGE="JavaScript">
      <!--begin
      
      function popup(filename){
      window.open(filename, "","height=300,width=300,top=0,left=0,location=no,menubar=no,
      resizable=yes,scrollbars=no,status=no,titlebar=no,toolbar=no,directories=no");
      }
      // end -->
      </SCRIPT>
      To make the new window pop up on exit using the example code above, you simply add the following code to your body tag:

      Code:
      onUnload="popup('popup.html')"
      Your body tag may therefore look like the following:

      Code:
      <body bgcolor="white" onUnload="popup('popup.html')">
      As you can see by this code, we have set a variable to true, and then test that this variable is still true before the new window is displayed. If the variable is not true, the popup will simply not appear.

      To enable this, we need to then add code to all the links and buttons, where if the user clicks them we do *not* want the popup to appear. Other links and buttons we just leave well alone.

      This is the code we need:

      Code:
      onclick="exit=false;"
      This sets the value of the exit variable to false, so that when the test on the variable runs, it will fail and the new window will not appear.

      We add this code to the relevant tags for buttons and links as follows. Here's an example for a standard link:

      Code:
      <a href="purchase.html" onclick="exit=false;">Buy now!</a>
      If you want to add the code to a button rather than a link, here's an example of how you should install the code:

      Code:
      <input type="button" value="Buy now!" onclick="exit=false;">
      That's all there is to it. As always, make sure you test your web page before you upload it to your web site to make sure it works to your satisfaction.

      Fling.com doesn't steal your traffic and sales unlike some other dating companies. I promote them, and so should you!

      Comment

      • romeoboi
        Confirmed User
        • Aug 2003
        • 343

        #4
        Ive seen a few sites use a 1x1 pixel size flash .swf file that is able to popup a window without getting blocked by the popup blockers which work on javascript - anyone know where there is more info on something like that?

        Cash in on Exclusive ZERO TOLERANCE DVD Downloads!

        Comment

        • Argoz
          Confirmed User
          • Aug 2002
          • 3006

          #5
          Originally posted by romeoboi
          Ive seen a few sites use a 1x1 pixel size flash .swf file that is able to popup a window without getting blocked by the popup blockers which work on javascript - anyone know where there is more info on something like that?
          Good question.
          rssEVOLUTION : Produce a FULL website with ANY RSS feed(s) in seconds.

          contentSOLUTION : Allowing you to automatically grab articles from article directories,
          import as many text files as you want at once, grab ANY content from ANY RSS feed, and scrape search engines, instantly.

          Comment

          • BoNgHiTtA
            Confirmed User
            • May 2003
            • 2176

            #6
            Cant do exit pops in firefox from what I understand. Smokey has some good stuff for doing it in IE though. Search by his name

            Wanna see how Adult Site Traffic Scammed me? Click Here:

            Comment

            • woj
              <&(©¿©)&>
              • Jul 2002
              • 47882

              #7
              Originally posted by fetishblog
              ...
              good info, but too bad that hasn't worked for 2+ years...
              Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
              Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
              Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

              Comment

              • BigRod
                Confirmed User
                • Apr 2005
                • 3685

                #8
                Thanks for the info people very much appreciated....
                Rod Macdonald
                Mainstream Ad Agency Owner
                ICQ: 607306

                Comment

                Working...