greboguru
Mar 16th 2008, 3:13 pm
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>
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);
}
});
});
Any help from you jQuery experts would be seriously welcome
Thanks!
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>
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);
}
});
});
Any help from you jQuery experts would be seriously welcome
Thanks!