Outstanding issues with jQuery.ajax() in IE8?
Posted
by RyanV
on Stack Overflow
See other posts from Stack Overflow
or by RyanV
Published on 2010-03-23T06:39:44Z
Indexed on
2010/03/23
6:43 UTC
Read the original article
Hit count: 228
I am loading feed-items into a ul using this jQuery .ajax() call, which I basically lifted from http://www.makemineatriple.com/2007/10/bbcnewsticker/
var timestamp = true; //set whether timestamp is displayed in
$.ajax({
type: "GET",
url: "sample-feed.xml",
dataType: "xml",
success: function(xml) {
$(xml).find('item').each(function(){
var title = $(this).find('title').text();
var link = $(this).find('link').text();
if(title.length >=57){
title = title.substring(0,54) + "...";
}
var addItem = '<li class="tickerTitle"><a href="'+link+'">'+title+'</a>';
if (Boolean(timestamp)== true){
var time = new Date(Date.parse($(this).find('pubDate').text()));
addItem +='<span class="timestamp">' + makestamp(time) +'</span></li>';
}
$('ul#news').append(addItem);
});
It works in Chrome 4 and Firefox 3.6, but I load it up in IE8 and somehow the ajax call fails. I have tried to use IE8's Developer tools to see where exactly it fails, but I haven't been successful yet.
So two questions
- Is there anything blatantly wrong with my ajax call here that could be preventing me from seeing it in IE where it works in FF/Chrome?
- Are there any special considerations I have to make for the Internet Explorer family of browsers with regards to this particular jQuery method?
I've done some googling on this but nothing obvious is coming up.
One other note: I am currently using jQuery 1.3.2 due to some legacy scripts on the same site. I did try loading 1.4.2 and it had the same results on IE8
© Stack Overflow or respective owner