title: jQuery Ajax does not update the result inside the div
body: <p>This question might be basic for most of the people out here, but I'm really fed up of           not getting the desired o/p. I want to make AJAX calls when an item from the list(id = vzlabs_data) is being clicked and its respective data should be updated inside the table(id = table_data). </p>
  
  <p>Currently, I'm able to POST the data, make the db calls against it, fetches it data and the data fetched is being printed in the python interpreter but is not updated inside the table.</p>
  
  <p>Where I'm going wrong?</p>
  
  <p><strong>HTML template</strong>   </p>
  
  <pre><code>&lt;div class="navbar"&gt;
      &lt;div class="navbar-inner"&gt;
          &lt;ul class="nav" id="nav_bar"&gt;
              &lt;li class="active"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;&lt;a href="#device"&gt;Device&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;&lt;a href="#content"&gt;Content&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;&lt;a href="#about"&gt;About&lt;/a&gt;
              &lt;/li&gt;
              &lt;li&gt;&lt;a href="#help"&gt;Help&lt;/a&gt;
              &lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="pull-right"&gt;From :
      &lt;input type="text" id="from" name="from" /&gt;To :
      &lt;input type="text" id="to" name="to" /&gt;
  &lt;/div&gt;
  &lt;br&gt;
  &lt;br&gt;
  &lt;div class="container-fluid"&gt;
      &lt;div class="row-fluid"&gt;
          &lt;div class="span2 pull-left"&gt;//****** An item is picked up from this list**********
              &lt;ul class="nav nav-tabs nav-stacked"
              id="vzlabs_data"&gt;
                  &lt;li class="active"&gt;&lt;a href="#"&gt;All Data&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;VZW3RD&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;VZWLAB&lt;/a&gt;
                  &lt;/li&gt;
                  &lt;li&gt;&lt;a href="#"&gt;VZW2ND&lt;/a&gt;
                  &lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
          &lt;!-- end of div span2--&gt;
          &lt;div id="pie_chart" class="span4" style="height: 275px"&gt;&lt;/div&gt;
          &lt;!-- end of div span4--&gt;
          &lt;div class="span5"&gt;
              &lt;table class="table table-striped" id="table_data"&gt;
                  &lt;thead&gt;
                      &lt;tr&gt;
                          &lt;th&gt;Categories&lt;/th&gt;
                          &lt;th&gt;Subscribers&lt;/th&gt;
                          &lt;th&gt;Rate(bps)&lt;/th&gt;
                          &lt;th&gt;Tonage(Bytes)&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/thead&gt;
                  &lt;tbody&gt;// Data is updated over here. {% for key, value in vzlab_data.items %}
                      &lt;tr&gt;
                          &lt;td&gt;{{key}}&lt;/td&gt;
                          &lt;td&gt;{{value.subscriber}}&lt;/td&gt;
                          &lt;td&gt;{{value.rate_bps}}&lt;/td&gt;
                          &lt;td&gt;{{value.tonage_bytes}}
                              &lt;div class="progress"&gt;
                                  &lt;div class="bar" style="width: 60%;"&gt;&lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;{%endfor%}&lt;/tbody&gt;
              &lt;/table&gt;
          &lt;/div&gt;
          &lt;!-- end of div span7--&gt;
      &lt;/div&gt;
      &lt;!-- end of div row--&gt;
  </code></pre>
  
  <p><strong>JS function</strong></p>
  
  <pre><code>$(function () {
      $("#vzlabs_data li").click(function () {
          $.ajax({
              type: "POST",
              url: "/dashboard/",
              data: {
                  'lab': $(this).text()
              },
              success: function (result) {
                  $("#table_data").html(result);
              }
          });
      });
  });
  </code></pre>
  
  <p><strong>views.py</strong> </p>
  
  <pre><code>def dashboard(request):
      vzlab_data = get_vzlab_data("All Data")
  
      if request.is_ajax():
          lab           = request.POST['lab']
          vzlab_data    = get_vzlab_data(lab)
          return HttpResponse(simplejson.dumps(vzlab_data), mimetype='application/javascript')
  
  
  ctx = {'vzlab_data' : vzlab_data}
  
  return render_to_response('dashboard/dashboard1.html',ctx, context_instance = RequestContext(request))
  </code></pre>