js popup that appears only when backing out of a page?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • coolegg2
    Confirmed User
    • May 2005
    • 210

    #1

    js popup that appears only when backing out of a page?

    Sometimes I think google is not the SE it once was... having trouble finding something like this:

    I need some javascript that will pop up a window only when the user uses the browser Back button, but not if they click a link on the page. In otherwords the scenario is

    Page 1 > Page 2 > Sign-up Page

    I want a popup to appear if the person backs out of Page 2 but not if they proceeed to the sign-up form.

    Any suggestions?
  • munki
    Do Fun Shit.
    • Dec 2004
    • 13393

    #2
    standard pop up code with validation variable on clicked urls

    if user clicks <a> 1 the pop up is turned on

    if user clicks <a> 2 the pop up is turned off...

    simple enough

    I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

    Comment

    • coolegg2
      Confirmed User
      • May 2005
      • 210

      #3
      Thanks munki, but can you elaborate? I don't follow you exactly. An example page maybe?

      If you are saying have the standard popup-on-exit code but somehow it gets disabled if they click on the link to the signup page, then that would work for me, but I have no idea what that js would look like.

      Comment

      • munki
        Do Fun Shit.
        • Dec 2004
        • 13393

        #4
        use a js if then else statement... and set the var from the a href call

        I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde

        Comment

        • coolegg2
          Confirmed User
          • May 2005
          • 210

          #5
          Okay, thanks man. That points me in the right direction. I don't know js very well though, so I'll have to try to find an example/sample code.

          Comment

          • sysk
            Confirmed User
            • Aug 2007
            • 1005

            #6
            Try AJAX for switching between pages until registration is completed and add a JS that will alert() or confirm() on exit.
            icq: 612510168 / email: [email protected] / php ninja 4 hire

            Comment

            • pornguy
              Too lazy to set a custom title
              • Mar 2003
              • 62910

              #7
              Guys. he is looking for the code. Anyone that has it please share.

              If I had it, I would post it for you.
              If I find it today I will.
              PornGuy skype me pornguy_epic

              AmateurDough The Hottes Shemales online!
              TChicks.com | Angeles Cid | Mariana Cordoba | MAILERS WELCOME!

              Comment

              • coolegg2
                Confirmed User
                • May 2005
                • 210

                #8
                Originally posted by pornguy
                Guys. he is looking for the code. Anyone that has it please share.

                If I had it, I would post it for you.
                If I find it today I will.
                Thanks man.

                And if anyone else has it handy that would be great!

                Comment

                Working...