title: Use variable to send data with jQuery AJAX
body: <p>I'm using jquery AJAX to instant save things, however when an ID already exists it will give a hidden element with data in it. Which is already given as the 'right' syntax for <code>$.ajax</code> data.</p>
  
  <p>I'm returning something like this:</p>
  
  <p><code>{'km' : '43223432', 'id' : '2', 'date' : '15-01-2014'}</code></p>
  
  <p>All values can be different ofcourse.</p>
  
  <p>However; if this is returned, the user can click on a button to 'overwrite' the data. Data is stored in: <code>$(".errorLogContent")</code></p>
  
  <pre><code>    var text = $(".errorLogContent").text(); 
  $.ajax({
      type: "POST",
      url: "../uitvoer/overschijf.php",
      data: text
  });
  </code></pre>
  
  <p>Why isn't this working?</p>