Hi My response to my AJAX request is as follows <?xml version="1.0"?> <response> <status>0</status> <data> <![CDATA[<table><tr><td><a href="#"><img style="border:0;" src="image/b_del.png"/></a></td><td>16/03/2006</td></tr> <tr><td><a href="#"><img style="border:0;" src="image/b_del.png"/></a></td><td>1</td></tr></table>]]</data> <message></message> </response> Code (markup): I'm trying to extract the data table and insert it into a DIV on my page ... I'm not seeing anything? The code is (extract)... $.post("testEvent.php", { cmd: "ad", val: $("#newCourseDate").val() }, function(response) { if ($("status", response).text() != 0) { // something is not right alert($("message", response).text()); } else { // replace the existing dates with the new ones $("#eventDates").empty(); var table = $("data", response).text(); $("#eventDates").html(table); } }); }); Code (markup): Any help from you jQuery experts would be seriously welcome Thanks!
var table = $("data", response).text(); PHP: Doesn't 'response' have the response anyway? What happens if you insert that straight into the table?
Hi, Thanks for the response. If I insert the whole of the response I get the status field appearing as well. I just want to extract the data part and effectively inserting the <table> contained within it, into a DIV. Thanks for your time gG