• I am working on a hack to the mailchimp.js that will turn on the display of content after a successful subscription to the list.

    I have this working just fine in my sample domain. While doing that a question came up that I thought some of the more advanced folks on this forum might have an answer to.

    Can you tell me if mailchimp.js is working because of a crossdomain.xml file on the mailchimp.com domain? Or, is there some jQuery (or php) magic happening?

Viewing 4 replies - 1 through 4 (of 4 total)
  • That file is hosted on your site and talks to your site – no magic going on there. The connection back to Mailchimp is done via the API, which has nothing to do with js.

    Thread Starter gxxaxx

    (@gxxaxx)

    I thought the following code meant that it was happening in the jQuery stuff.

    // Attach our form submitter action
    $(‘#mc_signup_form’).ajaxForm({
    url: mailchimpSF.ajax_url,
    type: ‘POST’,
    dataType: ‘text’,
    beforeSubmit: mc_beforeForm,
    success: mc_success
    });

    Since I switched into the “Use Javascript Support?” I thought that somewhere in all the js tangle that XMLHttpRequest was being used.

    I know nothing of jQuery so I can’t tell whether there is php magic going on, or if it is all javascript.

    Right, but the js there posts back to *your* server where some php code that is part of the plugin makes the actual API call. It’s done that way so that it is secure – otherwise we’d be putting your API Key out in public, and that’s a very bad thing.

    Thread Starter gxxaxx

    (@gxxaxx)

    I figured it was either in the js itself, or in php. It makes sense that it is in the php. Much less trouble with crossbrowser issues and, as you say, everything is local to the server.

    Thanks for the answer,
    Claude

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘[Plugin: MailChimp List Subscribe Form] Question about MailChimp.js’ is closed to new replies.