I'm doing a simple AJAX post request in jQuery to another page on my site to get an XML document response. I'm putting the response into a pre
element with syntax highlighting enabled. The response comes through fine (I can alert
it), but it isn't being added to thepre
element when I attempt to assign it in the handlResponse
function with jQuery.
<head>
<script>
...
function handleResponse(response, status)
{
$("#output").text(response);
}
$.post(url, data, handleResponse, "text");
...
</script>
</head>
...
<pre id="output">
</pre>
Just to be clear, the javascript code above is in jQuery's document ready function. Any help would definitely be appreciated.