Pop-Up Msg Fix (IRRITATING!! Think you can help me??)

6 replies
Hi there!

I have a salespage to my membership site ( Internet Rockstars VIP ) that I can't get to work like I want...

If the visitors exits the page, I have a pop-up script redirecting them to a survey I've created. However - the problem is that that pop-up script is poping up even though you press the buy button (which I obviously don't want)

I've tried to add some code to it, but it seems like I'm just messing up. Would really appreciate some help...

Thanks,
Joachim
#fix #irritating #msg #popup
  • Profile picture of the author Brendanm
    Post the code you are using for the popup so i can diagnose it.
    Signature
    {{ DiscussionBoard.errors[5749884].message }}
    • Profile picture of the author Joachim Larsen
      <script type="text/javascript"><!--
      var allowPrompt = true;
      done = false;
      window.onbeforeunload = WarnUser;
      function throughlink(){
      throughlink = true;
      }
      function WarnUser()
      {
      if(allowPrompt && throughlink !=true && done !=true)
      {
      done = true;
      // Place your upsell URL here
      document.location = "http://www.howtomaketheinternetrock.com/internet-rockstars-survey.html";
      var message = "-- WAIT! -- WAIT! -- SERIOUSLY!! YOU NEED TO CLICK CANCEL..! Listen to this: How would you like to get my most popular report inside my membership site for FREE? I'll send you the awesome report if you just take 2 minutes of your time and fill out this survey...This offer won't be up for ever, SO ACT NOW WHILE IT'S STILL AVAILABLE!!! All you need to do is to click on --*CANCEL*--, I repeat: --*CLICK CANCEL*-- now to get my most popular report!";
      return message;
      }
      else
      {
      // Reset the flag to its default value.
      allowPrompt = true;
      }
      }
      window.setTimeout("resetdone()", 1000);
      function resetdone(){
      done = false;
      }
      function NoPrompt()
      {
      allowPrompt = false;
      }
      // --> </script>
      {{ DiscussionBoard.errors[5749913].message }}
  • Profile picture of the author Brendanm
    I have looked at the buy button and all that is there is
    <a href="?action=order"> <img src="images/order.gif" border="0" height="119" width="234" /></a>

    There is nothing linking it to the popup script. I will keep looking.
    Signature
    {{ DiscussionBoard.errors[5750015].message }}
    • Profile picture of the author Joachim Larsen
      Thanks for taking a look at it, Brendanm!

      Yeah, that's where I tried to paste in the onclick="true" code (don't remember if it were written exactly like that, but you get the idea?)

      But that just messed up everything...I did get the pop up to not pop up when I pressed the buy now button, but then I was just re-directed to the same page...Not to the paypal page...
      {{ DiscussionBoard.errors[5750060].message }}
  • Profile picture of the author Brendanm
    Try moving the popup code to the top of the page.
    Signature
    {{ DiscussionBoard.errors[5750077].message }}

Trending Topics