title: jQuery post to Campaign Monitor not working
body: <p>I'm have been using this script to post Name and E-mail to Campaign Monitor. But it don't work anymore? I'm getting error at 'var jform'.
  I'm getting ReferenceError: form is not defined:
  var jform = jQuery(form);</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script&gt;
  ajaxValidation = (function(){
   var _ajaxValidation = ajaxValidation;
   return function() {
    var originalResult = _ajaxValidation.apply(this, arguments);
    if(originalResult){
     var iframe_name = "crossdomainpost";
     if(jQuery("#" + iframe_name).length) return true;
     var jform = jQuery(form); // I'm getting error here!
     if(jQuery("input:checkbox[name*='Newsletter']", jform)[0].checked){
      crossDomainPost(iframe_name).done(function(){ jform.submit(); });
     }else{
      return true;
     }
    }
    return false;
   }
  })();
  
  function crossDomainPost(iframe_name){
   var iframe = document.createElement("iframe");
   var uniqueString = iframe_name;
   var r = jQuery.Deferred();
   document.body.appendChild(iframe);
   iframe.style.display = "none";
   iframe.id = uniqueString;
   iframe.contentWindow.name = uniqueString;
   iframe.onload = function(){ r.resolve(); }
  
   var form = document.createElement("form");
   form.target = uniqueString;
   form.action = "http://mydomain.createsend.com/t/r/s/xxxxxxx/";
   form.method = "POST";
  
   // repeat for each parameter
   var input_name = document.createElement("input");
   input_name.type = "hidden";
   input_name.name = "cm-name";
   input_name.value = jQuery("#RSEProName").val();
   form.appendChild(input_name);
   var input_email = document.createElement("input");
   input_email.type = "hidden";
   input_email.name = "cm-xxxxxxx-xxxxxxx";
   input_email.value = jQuery("#RSEProEmail").val();
   form.appendChild(input_email);
  
   document.body.appendChild(form);
   form.submit();
   
   return r;
  }
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>