I'm new to jquery and to some extent javascript programming. I've successfully started to use jquery for my ajax calls however I'm stumped and I'm sure this is a newbie question but here goes.
I'm trying to return in an ajax call a complete html structure, to the point a table structure. However what keeps happening is that jquery either strips the html tags away and only inserts the deepest level of "text" or the special characters like <
,>
, etc get replaced with the escaped ones
I need to know how to turn off this processing of the received characters. Using firebug I see the responses going out of my webserver correctly but the page received by the user and thus processed by jquery are incorrect. A quick example will so what I mean.
I'm sending something like this
<results><table id="test"><tr>test</tr></table></results>
what shows up on my page if I do a page source view is this.
<results><table....
so you can see the special characters are getting converted and I don't know how to stop it.
The idea is for the <results></results>
to be the xml tag and the text of that tag to be what gets placed into an existing <div>
on my page.
Here is the javascipt that I'm using to pull down the response and inserts:
$.post(url, params, function(data)
{
$('#queryresultsblock').text(data)
}, "html");
I've tried various options other than "html" like, "xml", "text" etc. They all do various things, the "html" gets me the closest so far.
thank you for any help.
tim