php - How to output the response HTML data by a jQuery AJAX request? -


i have online shop shopping cart. cart, <table>, refreshes content after adding article cart.

use jquery's ajax method receives html <td><tr> response called php script. firebug's console shows correct response call.

can see in code, want add html table. can't work. not understand ajax method? want add these <td><tr> shopping cart table.

javascript (using jquery 1.9.1)

$.ajax({     url: 'php/addtoshoppingcart.php',     type: 'post',     datatype: 'html',     data: content,      complete: function(data) {           $('#shop section table tbody').append(data);     }, }); 

firebug console

enter image description here

have tried using .done()?

$.ajax({   url: 'php/addtoshoppingcart.php',   type: 'post',   datatype: 'html',   data: content, }).done(function ( data ) {   $('#shop section table tbody').append(data); }); 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -