1

I am calling some data which has pre-formatted HTML code in it, but when it renders from the jquery it appears to ignore my markup. This is my jQuery:

function GetFeed(){
   document.getElementById("marq").innerHTML = '';

   $.ajax({
    type: "POST",
    url: "xmlproxy.ashx",    
    dataType: "html",
    success: function(obj) {        
       $('<span class="tickerItem"></span>').html(obj).appendTo('#marq');
    }
   });
}
1
  • What do you see when you alert(obj); in the success function? Commented Apr 20, 2010 at 16:13

1 Answer 1

1

Your selector is wrong just do:

$("#marq").append(your_html);
Sign up to request clarification or add additional context in comments.

3 Comments

I just tried it but unfortunately that doesn't make any difference.
then it's probably not returning anything, have you used firebug to check what the post is returning?
sorry my friend, i used the sniffer and saw that the data i was passing in must have stripped out the markup. your recommendation was fine. cheers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.