title: Forms with Ajax send with multi-parameter and A href
body: <p>within the form element I send data with a href. Using the JavaScript (as defined below), it works perfectly.</p>
  
  <p>I want to send the forms now with Ajax, unfortunately it does not work. Do you have a solution for me. jQuery is included on the page.</p>
  
  <p>Thank You!</p>
  
  <pre><code>function sendData(sFm, sID, sFn, sCl) {
      var form = document.getElementById(sFm);
      form.sid.value = sID;
      form.fnc.value = sFn;
      form.cl.value = sCl;
      form.submit();
  }
  </code></pre>
  
  <p><code>
  </code></p>
  
  <pre><code>&lt;a href="Javascript:sendData('myform', '2343', 'product', 'order');"&gt;Send Data&lt;/a&gt;
  </code></pre>
  
  <p>My new Code:</p>
  
  <pre><code>function sendData(sFm, sID, sFn, sCl) {
      var form = $("#"+sFm);
      form.submit( function() {
          var sid = $('input[name="sid"]').val(sID);
          var fnc = $('input[name="fnc"]').val(sFn);
          var cl = $('input[name="cl"]').val(sCl);
          $.ajax({
              type: form.attr('method'),
              url: form.attr('action'),
              data: {sid: sid, fnc: fnc, cl: cl}
          }).done(function( e ) {
          });
      });
      form.submit();
  }
  </code></pre>