Search code examples
jqueryajaxparsingparse-error

jQuery AJAX parsererror


I am working on the following page.

http://www.ranger.ryerson.ca/library/test/steveDev/testcarousel/test.html

it works in firefox, chrome, and opera, but in IE6,IE7, and Safari (the god forsaken browsers) they all give me "parsererror"

My page uses the jquery XML parser, and the bad browsers dont like it. The troubled code is the following

$.ajax({
        type: "GET",
        url: "http://www.ranger.ryerson.ca/library/test/steveDev/testcarousel/readXML.cfm",


        dataType: "xml",
        success: function(xml) {
            $(xml).find('images').each(function(){
                $(this).find('pic').each(function() {
                    temp= '<a href="'+$(this).find('link').text()+'"><img src="'+$(this).find('thumbnail').text()+'" width="'+$(this).find('width').text()+'" style="border-style: none" height="75" title="'+$(this).find('alt').text()+'"alt="'+$(this).find('alt').text()+'" /></a>';
                    carousel.add(count, temp);
                    count++;
                });
                carousel.size(count);
            });
        },
        error: function(XMLHttpRequest, textStatus, errorThrown){
            alert(textStatus);
        } 

    })

how can I resolve my problem


Solution

  • There's an Encoding Error encountered on this node:

    <alt>Eugénie</alt>
    

    on line 97.

    I notice you specify encoding="utf-8" as the encoding. Are you sure the "é" is really encoded with utf-8?