title: How to retrieve the value of a text area in javascript
body: <p>I have a form with a text area input. I'm using JQuery to submit the form via an AJAX request in order to update a database. My problem is that I'm having difficulty retrieving the data from the text area input. If the input has an id of "txtBody" I have tried:</p>
  
  <pre><code>var body = $("#txtBody").val(); // This adds 'undefined' to the database  
  var body = $("#txtBody").text(); // This adds nothing to the database  
  var body = $("#txtBody").html(); // This adds 'NULL' to the database  
  </code></pre>
  
  <p>I can't think of how else to access the data. Any ideas?</p>