title: How to pass Joomla form data via Ajax call to controller function
body: <p>In my Joomla 3.3 form I inserted an ajax script to update some form fields dynamically.
  ...mainpart of the script is</p>
  
  <pre><code>formdata = new FormData();
  jQuery.ajax({
  type: "POST",
  dataType: "json",
  timeout: 6000,
  url: "index.php?option=com_mycomponent&amp;task=component.save",
  data: formdata,
  ......................
  ........
  </code></pre>
  
  <p>After firing the ajax script, $_POST is completely empty in the controller, and I cannot access important formdata.</p>
  
  <p>Meanwhile I tried several ways, eg</p>
  
  <pre><code>formdata = new FormData($(this)[0]); =&gt; nothing happens
  </code></pre>
  
  <p>or</p>
  
  <pre><code>formdata = new FormData();
  formdata = $(this)[0]; =&gt; nothing happens
  </code></pre>
  
  <p>or</p>
  
  <pre><code>formdata = new FormData();
  form = $(this)[0];
  formdata.append("jform", form) =&gt; this fills up my $_POST, but with value undefined
  </code></pre>
  
  <p>How can I pass my formdata (the jform object) to the controller via Ajax POST method?</p>