title: JQuery AJAX post - how to send extra form variables?
body: <p>I'm using ajax for the first time and have hit a bit of a brick wall.</p>
  
  <p>I've created a single big function with lots of smaller functions inside it which handles all ajax requests. I'm passing a POST variable to tell it which function to process the request with.</p>
  
  <p>For example</p>
  
  <pre><code>if(_is_ajax()) {
    if($_POST['save_company']) {
    // Do stuff here
    }
  }
  </code></pre>
  
  <p>However, I don't know how to use jQuery ajax functions in a way where I can set the post variable AND pass serialized data.</p>
  
  <p>here's my code:</p>
  
  <pre><code>var values = $("#edit_company").serialize();
  $.post("/admin/companies", { 'save_company' : true } ,
      function(data){
          console.log(data);
      }, "json")
  </code></pre>
  
  <p><code>'save_company' : true</code> sets the post variable, but where do I include <code>values</code>?</p>