jQuery AJAX converting variable string to html styled text
- by sadmicrowave
I've got an AJAX transmission of a variable string in my primary coding language (Visual FoxPro 9) that looks like this:
AjaxResponse = CREATEOBJECT("Custom")
lcMessage = "<li class='hello'>Hello</li>"
AjaxResponse.AddProperty("Reply", lcMessage)
Response.ContentType = "text/html"
Response.Write(AjaxResponse.Reply)
While using the jQuery function .ajax() I've created a success: function that looks like this:
$.ajax({
url: 'index?Proc=GetUuserHistory',
dataType: "html",
success: function(data){
$("div#history-text").text(data);
};
});
My problem is that the text inserting into 'div#history-text' is unformatted and contains the li tags still. I've tried substituting the .text for .prepend, .append, and .html with no luck...is there a way to convert this string back to html format after its been received using Ajax?