Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Exit Pop problem ...

    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:

    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.

  • #2
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    A function can not be false, it can be null. false is a value, null is an object (same as a function).
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • Users who have thanked Kor for this post:

    otrap (07-22-2010)

  • #3
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Ah, so if I would just replace "false" with "null," it should work then?

  • #4
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    Quote Originally Posted by otrap View Post
    Ah, so if I would just replace "false" with "null," it should work then?
    Probably. Give it a try
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • Users who have thanked Kor for this post:

    otrap (07-22-2010)

  • #5
    New to the CF scene
    Join Date
    Jul 2010
    Posts
    4
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Tried switching it to "null," and that didn't work.

    However, removing the onclick attribute altogether did the trick!

    Thanks for your help!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •