title: Not requesting through ajax
body: <p>To send values to php through ajax ,i have created following functions in JS.</p>
  
  <pre><code> function sendDataToServer(url,val)
      {
          var html='';
          html +='&lt;div id="fakeDiv"&gt;';
          html +='&lt;form action="'+url+'" method="get" enctype="multipart/form-data" id="fakefrm"&gt;';
          html +='&lt;input type="hidden" name="jsvar" id="jsvar" value="'+val+'"/&gt;';
          html +='&lt;/form&gt;';
          html +='&lt;/div&gt;';
          $('body').append(html);
          sendAjaxForm($('#fakeDiv'),function(){return true;},
  function(){alert('done');$("#fakeDiv").remove();});
      }
  </code></pre>
  
  <p>sendAjaxForm</p>
  
  <pre><code>function sendAjaxForm(frm,callbackbefore,callbackdone)
  {
      var form = frm;
      form.submit(function(event){
          event.preventDefault();
          var formData = new FormData(form);
          var ajaxReq=$.ajax({
              url: $(this).attr('action'),
              type: $(this).attr('method'),
              data: formData,
              async: false,
              cache: false,
              contentType: false,
              processData: false,
              beforeSend: function(){
                              callbackbefore();
                          }
              });
  
              ajaxReq.done(function(data){
                  callbackdone(data);
              });
      }); // submit done
  }
  </code></pre>
  
  <p>Then calling it on the page as </p>
  
  <pre><code>sendDataToServer("master.php?action=send_token","23x4dzy009r");
  </code></pre>
  
  <p>But no request is being made , as seen in console..  No any syntax error even recognised . What is wrong in this ??  </p>