Support » Plugin: MailChimp for WordPress » make AJAX success/fail msg appear in fancybox?

  • Resolved nimmolo


    Hi Danny,

    Thanks for this plugin!

    I’m putting the mailing list signup form in a Fancybox overlay on the page (via the shortcode). I imagine the AJAX success/fail messages are probably set to render live within the form/fancybox, but in my case the box is simply closing without the messages.

    In other words when someone signs up, it gives the address to Mailchimp, and correctly receives the success/fail message. But the message only appears the NEXT time I open the form. It doesn’t appear before closing, so the client doesn’t know if their signup worked or not until clicking the form trigger again.

    The reason I ask is that I’m switching my mailing list from iContact to MailChimp, and the signup form plugin/shortcode I was using for iContact (“Easy iContact”, on the WP repo) was returning success/fail messages within the fancybox without closing it, also without any further coding of the fancybox.

    [Signature removed by moderator per forum rules.] (see big mailing list link at right)

Viewing 5 replies - 1 through 5 (of 5 total)
  • nimmolo


    I should have mentioned, I’m using the shortcode to render the form. 🙂

    Plugin Author Danny van Kooten


    Hi nimmolo,

    That’s because there is no AJAX call at the moment. The plugin just submits the form. An AJAX call sounds like a nice improvement though, I’ll work on it in a future version of the plugin.

    For now, you could add a line of JavaScript to the success message that simulates a click on the button so the Fancybox opens.

    Something like this will do.

    <script type="text/javascript">
    jQuery(document).ready(function() {

    If I’m right, you can just paste it after your success message.

    Let me know if that worked for you.

    [Signature removed by moderator per forum rules.]

    Plugin Author Danny van Kooten


    I did some testing, at the moment you can not yet include JavaScript in your success message because the values are not properly escaped by me. My bad, I fixed it this in version 0.6.2.

    Good luck.

    [Signature removed by moderator per forum rules.]



    Danny thanks.
    I did try adding the little script to the success (and other) messages and I still couldn’t get the script to hold the fancybox open.

    More generally:
    It’s funny, none of the MailChimp subscribe plugins seems to do the ajax call. I’ve tried some solutions posted on stackoverflow and these are not doing it for me either, although I could be doing any number of things wrong.

    In case you do want to add AJAX, this may really help you – Ben Mcfadden’s Easy iContact plugin does the ajax call for iContact really elegantly. I’ve read through the code and it’s really simple, but I just suck at coding and it’s taking endless hours for me to try to figure out how to adapt it :(. Happy to help pay for dev.

    Plugin Author Danny van Kooten


    Hi Nimmolo,

    Just a quick heads up that I’ve added the AJAX call but it’s only available in the premium version of the plugin at the moment.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘make AJAX success/fail msg appear in fancybox?’ is closed to new replies.