[jQuery] Returning formatted text from AJAX call
<html>
<body>
Hello folks,
I cannot work out from the documentation how to return formatted text
arising from an ajax operation.
My code is...
<tt>$.fn.ajaxSubmit = function(e) {this.submit(function(){ var params =
{}; $(this) .find("input[@checked], input[@type='text'],
input[@type='hidden'], input[@type='password'], option[@selected],
textarea") .filter(":enabled") .each(function() { params[
this.name || this.id || this.parentNode.name || this.parentNode.id ] =
this.value; });$("div#indicate").show();
$.post("ajax_dcd.asp", params, function(text){
$("div#selfreview").html("<p
class=\"alert\">"+$(text).text()+"<\/p>"
);
$("div#indicate").hide();
}); return false;
});}
</tt>The "text" coming back (from an .asp file) contains HTML
tags which, in the above code, are being stripped out.
How can I return the data in a HTML format?
Thanks,
Bruce</body>
</html>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/