[jQuery] jQuery stripping HTML tags from Ajax response
Hi,
Here's what I'm working with (#thing is a table):
$.get("/applications/stuff.php",
{ '_request':'thing', 'id':id, 'otherid':$('#otherid').val() },
function(data) {
$('#thing').append(data);
}
$("#thing").show();
});
The PHP file returns a table row:
<tr>
<td><a href="something">1234</a></td>
<td>Thing Name</td>
</tr>
When I add 'alert(data);' to my return function it shows that whole
HTML thing with tr's & td's.
But what gets appended is:
<a href="something">1234</a>Thing Name
So all the HTML tags are gone.
Anyone know why?
Thanks.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home