title: Send JSON with AJAX
body: <p>Is there anything special I have to do to a JSON object before I send it with AJAX? My code looks like this: </p>
  
  <pre><code>runAjax(JSON.stringify(data));
  </code></pre>
  
  <p>}</p>
  
  <pre><code>function runAjax(JSONstring)
  {
      ajax = getHTTPObject();
      var params = "?data=" + JSONstring;
      ajax.open("POST", "createtrip.php", true);
      ajax.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      ajax.setRequestHeader("Content-length", params.length);
      ajax.setRequestHeader("Connection", "close");
      ajax.onreadystatechange = serverSpeaks;
      ajax.send(params);
  }
  </code></pre>
  
  <p>Right now the server is not receiving the data. I get null on the server side but the client side JSONString is set. Is there something I'm doing wrong?</p>