title: Setting submit value in jQuery submit
body: <p>I want to use jQuery to submit my form and i can do that like so </p>
  
  <pre><code>  $('#myform_id').submit();
  </code></pre>
  
  <p>and thats all good but normally someone clicks a submit button than that submit button has a value so when I do the submit via jQuery I also need to set a submit value how do i do that ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>as noted by some answers I could do this by simulating a user click but I don't want to do that I want to pass the submit value when I use the .submit() command if that is possible</p>
  
  <p>ultimately the submit using ajax form </p>
  
  <p>** Clarifying **</p>
  
  <p>ok so I have jQuery setup to use jquery validate and has a submit handler like so</p>
  
  <pre><code>$("#myform_id").validate({
      submitHandler: function() {
          run_ajax(obj);
      }
  });
  </code></pre>
  
  <p>then that calls I function i call run_ajax passing and object containing information about what type of ajax i want and what have you.</p>
  
  <p>and ultimately runs this</p>
  
  <pre><code>obj.formitem.ajaxSubmit({
      dataType:'json',
      data: obj.pdata,
  });
  </code></pre>
  
  <p>where</p>
  
  <pre><code>  obj.formitem == $('#myform_id');
  </code></pre>
  
  <p>so when the form is submit all that happens all good.</p>
  
  <p>so I load the page with this form into jquery dialog and I want them to be able to click a button in the dialog that triggers the form submit and also tells the form what type of submit was requested</p>
  
  <p>hopefully this is clear now sorry for confusion</p>