• Resolved sherbert96

    (@sherbert96)


    Hi I have a “learn more” link in my Boxzilla popup that links to a page on my site. Once users click that link I don’t want the popup to show anymore. But it doesn’t dismiss the popup unless they hit the boxzilla close button. Is there a way I can dismiss the popup on a link to a page? Or maybe I can dismiss the popup once I get to the page they clicked to? Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey @sherbert96,

    Thanks for reaching out to us.

    It’s not possible to dismiss the pop-up permanently after the user clicks and moves to another page. If a user is on “Page A” where the pop-up is displayed, and then the user clicks on a link to visit another page, is this not working? Can you please share more details about what you are trying to do?

    Thread Starter sherbert96

    (@sherbert96)

    Hi OK thanks for the info.

    Yes I’m on “Page A” with the popup. The popup has a button that says “Buy now”. They click “Buy now” from within the popup, it takes them to “Page B”. At this point I want the popup dismissed so it doesn’t show for the 365 day duration I have on dismiss. But when the user goes back to “Page A” the popup shows again. If the hit the close button then it dismisses it, but I’m trying to avoid them from having to hit the close button to make the popup go away.

    Sounds like this isn’t possible, I’ll try to figure out a better approach for this. Thanks!

    Plugin Contributor Lap

    (@lapzor)

    There is no official way to do this, but what you could do is use a little JS code to first close the box (and set the cookie) and then redirect to the other page.

    eg for the Box with ID 5

    <a href="#" onclick="Boxzilla.dismiss(5); location.href='https://the-link-here';">Buy now</a>

    You might even get away with this, but I’m not sure if every browser would still execute the JS before going to the new page:

    <a href="https://the-link-here" onclick="Boxzilla.dismiss(5);">Buy now</a>

    Hope that helps. If you have any questions, please let me know!

    Thread Starter sherbert96

    (@sherbert96)

    Thanks for the code. I did a quick test and it didn’t work but I have to run out. I’ll try again later. But this is helpful maybe I’ll try to call the dismiss on the page load of “Page B”.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Dismiss when link to page is clicked’ is closed to new replies.