• Resolved jiipsijack

    (@jiipsijack)


    Hi there, is there anyway to refresh the page that i opened the modal from when I close it? Ideally just with a single Modal not all of them. This functionality would be an amazing addition to an already great plugin, Thanks again for the quick support I received last time and thanks in advance for any help you can give me on this question.

    https://www.ads-software.com/plugins/easy-modal/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    You can use jQuery to override the close functionailty of that one modal.

    something like this should do the trick.

    jQuery('#eModal-1 .close-modal').click(function(e){
        e.preventDefault();
        location.reload();
    });

    Thread Starter jiipsijack

    (@jiipsijack)

    Thanks for such a quick reply, would you mind telling me whereabouts I should add this? I’m relatively new to jquery stuff at the moment. Would I be modifying your plugin or putting this somehwere in my theme? Thanks again.

    Plugin Author Daniel Iser

    (@danieliser)

    it either needs to be added to your themes Javascript files or before the /body tag between <script></script>

    Thread Starter jiipsijack

    (@jiipsijack)

    Hi again, I’ve added your script to my header, but the page doesn’t refresh when I close my modal window, I added it in using “css and js toolbox” plugin, it shows up correctly but I’m not seeing any change. I’ve tried it with plain <script> tags and with <script type=”text/javascript> The eModal I’m closing contains an iframe of another page on my site, don’t know if that makes any difference. The page is my shopping cart page, if you go to this example product – https://hoofpick.me/archives/product/tekna-ergonomic-girth and add it to your cart then try the “register” link you can see the Modal window. Once again, thank you so much for your help. Can’t wait to have this working.

    Thread Starter jiipsijack

    (@jiipsijack)

    Oh and upon registering, the user will see a new page telling them to close the window to continue with their purchase. I just haven’t finished that part yet. ??

    Thread Starter jiipsijack

    (@jiipsijack)

    Sorry, one more update, I’ve reset the register link to its standard form (no Modal Window) as people have tried to register on the site but I’ve pasted the source code from the page here: https://gist.github.com/jiipsijack/65f140d2ed56ad3a0fdd if you need to check it out.

    Plugin Author Daniel Iser

    (@danieliser)

    Your script code needs to be just before the closing /body tag, at the end of the page not the beginning.

    Hope this helps.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Refresh Page after modal closes’ is closed to new replies.