title: Append Jquery Ajax result to existing table
body: <p>I need to place ajax request result to existing table, how can it be done? here is my ajax request</p>
  
  <pre><code>$("input#order").click(function(){
      var idmenu  = $("#idmenu").val();
      var menu    = $("#idmenu :selected").text();
      var qty     = $("#qty").val();
  
      $.ajax({
          type    :'POST',
          url     :'&lt;?php echo base_url();?&gt;index.php/welcome/process',
          data    :'idmenu='+idmenu+'&amp;menu='+menu+'&amp;qty='+qty,
          beforeSend:function(){
              $("#result").html('&lt;img src="&lt;?php echo base_url();?&gt;assets/loading.gif"/&gt;');
          },
          success:function(result){
              //result is json format
          }
      });
  
  });
  </code></pre>
  
  <p>here is the json format from ajax request</p>
  
  <pre><code>{"itemname":"product1","qty":"3","prices":"4500"}
  </code></pre>
  
  <p>and here is my table format</p>
  
  <pre><code>&lt;table class="list-order"&gt;
      &lt;tr&gt;
          &lt;th class="order"&gt;order&lt;/th&gt;
          &lt;th class="qty"&gt;qty&lt;/th&gt;
          &lt;th class="pice"&gt;price&lt;/th&gt;
      &lt;/tr&gt;
      //how to append ajax result here
      &lt;tr&gt;
          &lt;td colspan="2"&gt;&lt;/td&gt;
          &lt;td align="right"&gt;&lt;input type="submit"  size="25" id="process" value="Proses"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>i want to append the result from ajax like </p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;
      &lt;td&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>and Not inside the  tag, like</p>
  
  <pre><code>&lt;tr&gt;
     &lt;td&gt;result is not here&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>final result look like this one</p>
  
  <pre><code>&lt;table class="list-order"&gt;
      &lt;tr&gt;
          &lt;th class="order"&gt;order&lt;/th&gt;
          &lt;th class="qty"&gt;qty&lt;/th&gt;
          &lt;th class="pice"&gt;price&lt;/th&gt;
      &lt;/tr&gt;
      &lt;!-- result look like this --&gt;
      &lt;tr&gt;
          &lt;td&gt;product1&lt;/td&gt;
          &lt;td&gt;2&lt;/td&gt;
          &lt;/td&gt;4500&lt;/td&gt;
      &lt;/tr&gt;
      &lt;!-- end result--&gt;
      &lt;tr&gt;
          &lt;td colspan="2"&gt;&lt;/td&gt;
          &lt;td align="right"&gt;&lt;input type="submit"  size="25" id="process" value="Proses"/&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>