Posts Tagged ‘XML’

IE Error when retrieving XML using JQuery .ajax()

June 22nd, 2011

Had an irritating error in IE 9 (and under) when trying to retrieve some XML using jQuery’s $.ajax() function, part of the issue ended up being that the dataType parameter MUST be in capital letters, for example:

This does not work:

$(document).ready(function()
{
  jQuery.ajax({

    type: "GET",
    url: "localXMLFile.xml",
    dataType: "xml",
    success: function( status )
    {
      //Success
    },
    complete: function( status )
    {
      //Complete
    },
    error: function( status )
    {
      //Error
    }
  });
});

» Read more: IE Error when retrieving XML using JQuery .ajax()