• Hello,

    I have popups that show up when I click on certain links. Then I can close those popups by clicking on the cross at the top right of the popup. All that works fine, congratulations for a great plugin.

    However, if I close a popup and then I refresh the page (or I close a popup, move on to another page, and then come back to that page), then the popup shows up again. I closed it, yet it comes back on refresh. Feels a bit like The Return of the Closed Popup!

    How can I ensure that a closed popup remains closed as it should? Thanks in advance for your help.

    Best regards, Stéphane

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

    (@hchouhan)

    Hey @srousset,

    Thanks for reaching out to us.

    Can you please share a screenshot of the settings of your pop-up? Also, please share a link and steps to test the pop-up.

    Thread Starter Stéphane Rousset

    (@srousset)

    Hi @hchouhan,

    Thank you for your reply. You’ll find the popup settings that I use here.

    To see what the problem is, proceed as follows:

    1. go there – this web site isn’t officially published yet, please don’t advertise it (just in case you’d want to do that with a web site in French!)
    2. click on any of the square portraits – this displays the popup
    3. close that popup (either by clicking outside it, or by clicking the cross at the top-right corner)
    4. refresh the window – the popup gets displayed again, even though it had been closed

    I hope that this gives you the elements to diagnose and fix the problem. Please let me know if you require any additional information, or if you want me to do some further testing. Thanks in advance.

    Best regards, Stéphane

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey @srousset,

    In the settings, there should be “Cookie Expiration” settings. Can you please share a screenshot of it?

    Thread Starter Stéphane Rousset

    (@srousset)

    Hi @hchouhan,

    There’s no Cookie expiration settings, as those settings disappear when I choose Auto-show box? = Never.

    Best regards, Stéphane

    Plugin Contributor Lap

    (@lapzor)

    Hey Stéphane,

    The cookie settings are for not (automatically) showing the popup again, so they aren’t doing anything if you do not auto-show the popup.

    What I believe is happening is that the links you use to open the box are anchor links (#boxzilla-123). So when you click that link you will see this anchor behind the URL in the browser bar. And when you refresh it’s still there and thus triggering the opening of the Boxzilla box again. This is normal and intended browser behavior.

    If you do not want this to happen, instead of using anchor links you can use javascript links. Those look like this:

    <a href="javascript:Boxzilla.show(123);">Close box</a>

    That example would open the box with id 123.
    So the “link” you would fill when creating a link in the visual editor, as opposed to the html editor as the example I gave here, would be javascript:Boxzilla.show(123);

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

    Thread Starter Stéphane Rousset

    (@srousset)

    Hi @lapzor,

    I acknowledge and understand your proposed workaround. Unfortunately, I find myself unable to make it work, for one or both of the following two reasons:

    • the pictures to which I currently associate anchor links are in fact managed by a gallery plugin, which expects those links to be URLs; maybe that plugin wipes out JavaScript when it sees some in that field
    • when I type the JavaScript code in my browser’s URL bar, it doesn’t work either; the only way I found to make it work is to type it in the console, which isn’t something I’m able to reproduce by means of some pseudo-URL that I would give as a pseudo anchor link

    So, I’m pretty much stuck, i.e. I guess I’ll have to live with that in-my-case-spurious redisplay of the popup when the users refreshes the window. Nevertheless, I wanted to thank you for the suggestion. (And if you have another idea, feel free to say so!) Thanks.

    Best regards, Stéphane

    Plugin Contributor Lap

    (@lapzor)

    When you type it in the URL bar, make sure to include the javascript: part, that should work.

    I think refreshing the page doesn’t happen that often actually, so if you’re not able to use javascript links it’s hopefully not terrible to just let the popup open again.

    Thread Starter Stéphane Rousset

    (@srousset)

    When you type it in the URL bar, make sure to include the javascript: part, that should work.

    I know, I know ??, I had done that but it didn’t work. Thanks anyway.

    Best regards, Stéphane

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Closed popups appear on refresh’ is closed to new replies.