View Full Version : Exit Pop problem ...

07-22-2010, 04:26 PM
I'm currently working on a site with an exit pop asking the visitor, "Are you sure you want to leave?"

The problem is that one of the links in the page is triggering the exit pop when it shouldn't be.

Here's the code:

<a href="intended_next_page.html" class="style4" onClick="ShowExitPopup = false;">Click Here To Continue </a>

I know this itself is HTML, but it's related to the exit pop, which is Javascript, so I thought this forum would be the appropriate one.

Any idea why this isn't working? I have another link on the page that looks identical (goes to a different page, but that's it), and it's working, but this one isn't. I can't figure it out.

Any help is greatly appreciated.

07-22-2010, 04:34 PM
A function can not be false, it can be null. false is a value, null is an object (same as a function).

07-22-2010, 04:44 PM
Ah, so if I would just replace "false" with "null," it should work then?

07-22-2010, 05:00 PM
Ah, so if I would just replace "false" with "null," it should work then?
Probably. Give it a try :)

07-22-2010, 05:14 PM
Tried switching it to "null," and that didn't work.

However, removing the onclick attribute altogether did the trick!

Thanks for your help!