title: OnClick Send To Ajax
body: <p>I'm trying to complete some ajax requests to insert a textarea into a database without refresh. Here is my code: </p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;textarea name='Status'&gt; &lt;/textarea&gt;
  &lt;input type='button' onclick='UpdateStatus()' value='Status Update'&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function UpdateStatus(Status)
      {
      var Status = $(this).val();
  
          $(function()
          {
              $.ajax({
                  url: 'Ajax/StatusUpdate.php?Status='.Status, data: "", dataType: 'json'
              });
  
          });
      }
  </code></pre>
  
  <p>My Questions:</p>
  
  <p>1) How do I send the contents of the text area into the onclick function? </p>
  
  <p>2) How do I escape/urlencode etc.. So it retains line breaks</p>