title: how to submit form name and submit button name in ajax form submission
body: <p>I am looking for some concise solution in which i am able to send form name and submit button name with form input fields. I have tries form.serializeArray() method but I am getting only input fields name inside post. then how can I send complete form data with form name and submit button name in just one line code</p>
  
  <pre><code> &lt;form id="formid" name="formName" class="formClass" action="service.php" method="POST" &gt;
          &lt;input type="text" id="fname" name="fname"/&gt;
          &lt;input type="text" id="lname" name="lname" /&gt;
          &lt;input type="Submit" id="SUBMIT" value="SUBMIT" name="submit"/&gt;
  
      &lt;/form&gt;
  
      $( "#formid" ).submit(function( event ) {
      //var array = $(this).serializeArray() ;  //  Didn't send Form name and submit button
      // var data2 = new FormData($( "#formid" )[0]); // I have also tried this
  
  
  
        $.ajax({
          type: $(this).attr('method'),
          url : $(this).attr('action') , 
          cache: false,
          contentType: false,
          processData: false,
          data:  formData,
          complete:function(httpResponse, status) {
          var response = httpResponse.responseText;       
          alert(response);
  
          }
        });
  
  
      event.preventDefault();
  </code></pre>
  
  <p>});</p>
  
  <p>I want to send Form name and Submit Button Name in ajax just like it works when page reloaded after submission of form.</p>
  
  <p>For more I have tried  <a href="http://jquery.malsup.com/" rel="nofollow">MALSUP</a> in which I am able to send form name and submit button name in the POST data. So what would be alternative way to do this in Jquery AJAX</p>