Any Way To Prevent My Exit Pop Up Triggering With Aweber Form?

5 replies
Hi Folks

I'm testing Ultimate Exit Pop Up, which pops up a Javascript box whenever a visitor exits a page. All fine and good, except when they fill out an Aweber form and press the button, the exit pop up comes up, preventing the form from being submitted!

The instructions for Ultimate Exit Pop Up tell me to add onclick="exit=false ;PreventExitPop=true" to any link where I don't want the pop up to activate, ie.

<a href="order.html" onclick="exit=false ;PreventExitPop=true">CLICK HERE TO ORDER</a>

... but here's the problem. I'm using Aweber's javascript code for generating opt-in forms, which look like this:

<script type="text/javascript" src="http://forms.aweber.com/form/11/123456789.js"></script>

So is there any way of using this Javascript, and at the same time prevent the exit pop up?

(I think the Javascript condition PreventExitPop=true will stop it from activating, but I don't know how to use that in conjunction with Aweber's javascript.)

Any help would be much appreciated!
#altering #aweber #behaviour #exit #form #javascript #pop #prevent #triggering
  • Profile picture of the author mywebwork
    Hi Paul

    I don't think you'll be able to do this if you use AWebers JavaScript form. Your script needs to be notified when the submit buttons "onclick" event is raised, and using the AWeber hosted script prevents that from happening.

    I would try using the "Raw HTML" option instead. The code is more cumbersome, but it will allow you to make your own modifications.

    The code is hard to read as the stylesheet information for the form you choose is embedded in it. Look for the line that starts with
    Code:
    <input name="submit" class="submit" type="submit" value="Submit"/>
    and try inserting your code there.

    Hope this is of some help, all the best to you for the holiday season.

    Bill
    {{ DiscussionBoard.errors[1535171].message }}
  • Profile picture of the author Paul Hancox
    Thanks, Bill. I couldn't see an easy way of doing it... so I may have to resort to the HTML version. Thanks for commenting.
    Signature
    PresellContent.com - How to sell without "selling"
    {{ DiscussionBoard.errors[1536128].message }}
  • Profile picture of the author supermail
    Worked for us... Thanks
    {{ DiscussionBoard.errors[1748768].message }}
  • Profile picture of the author Matthew Barnett
    Fixed it! I was missing a "

    The line of code when complete should look something like this:

    <input name="submit" class="submit" type="submit" value="Submit" tabindex="502" onClick="javascriptreventExitPop = true" />

    If you just cut and paste the OnClick bit from the text file that comes with the current version it is missing the final " which is why mine wasn't working.

    It is now though, and it works brilliantly.

    Example of it in action is here:

    http://www.cashvolcano.info/free
    {{ DiscussionBoard.errors[4950325].message }}

Trending Topics