title: django jquery post then load
body: <p>Trying to get a section on my site working when it basically acts in the same way as <code>facebooks wall post</code></p>
  
  <p>user sees a box where they input some information about how they feel, then I use a <code>jQuery $.post</code> method to submit the data, and then I would like to retrive the new data.</p>
  
  <p>Currently this is what I have.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
      $("#testform").submit(function(){
          $.post("/wall/new/", $("#testform").serialize());
          $('#id_text').val('');
          $(this).ajaxComplete(function() {
              $('#news').load('/wall/');
          });
          return false;
  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>And then the HTML looks like this</p>
  
  <pre><code>&lt;div id="news"&gt;
      &lt;h4&gt;{% trans "News feed" %}&lt;/h4&gt;
  
      &lt;form method="post" action="/wall/new/" id="testform"&gt;
          &lt;textarea id="id_text" class="wall-input" style="max-height: 100px;" rows="1" name="text"&gt;&lt;/textarea&gt;
  
          &lt;input type="submit" value="{% trans 'share' %}" class="blue" id="submit-wall"/&gt;
          &lt;div class="clearfix"&gt;&lt;/div&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>