title: Ajax submit post data to a get url
body: <p>Is it possible to mix post and get in ajax? Specifically have a form POST data to a url with get variables?</p>
  
  <p>In html and PHP I would normally do this:</p>
  
  <pre><code>&lt;form action="script.php?foo=bar" method="POST"&gt;
      ...insert inputs and buttons here... 
  &lt;/form&gt;
  </code></pre>
  
  <p>And the PHP script would handle it based on logic/classes.</p>
  
  <p>I have tried the following and several variations to no avail:</p>
  
  <pre><code>$(document).ready(function() {
      $('#formSubmitButton').click(function() {
              var data = $('#valueToBePassed').val();
                  $.ajax({
                      type: "POST",
                      //contentType: 'application/json',
                      url: "script.php?foo=bar",
                      data: data,
                      processData: false,
                      success: function(returnData) {
                          $('#content').html( returnData );
                      }
                  });
              });
          });
  </code></pre>
  
  <p>Is this even possible? If so what am I doing wrong. I do not feel as if I am trying to reinvent the wheel as it is already possible and used regularly (whether or not if it is recommended) by plenty of scripts (granted they are php based).</p>