Does this happen in both IE and Firefox, or only in IE?

If it's only in IE, IE has some kind of issue with returning XML with
the incorrect header content type.
Check the bottom of this post for a function:
http://groups.google.com/group/jquery-en/browse_thread/thread/036d49aead899d68

Try using the function text2html by Diego A. on the returned XML data.
Before you do that, remove the dataType:"xml" and contentType:"text/
xml" from your AJAX call so that IE will not error on the response due
to mismatched content type.

On Mar 26, 7:01 am, moocher <shaunaus...@hotmail.co.uk> wrote:
> Hi,
> I'm very new to JQuery and am having a problem with an Ajax call that
> returns xml. The error event is being fired, but the textStatus value
> is 'parserror' and the errorThrown value is 'undefined'. The xml
> response is valid so i'm not sure what could be wrong.
>
> $.ajax({
>     beforeSend: function() {
>
>      },
>     type: "GET",
>     url: "ajaxttest.asp",
>     dataType: "xml",
>     timeout: 1000,
>     contentType: "text/xml",
>     success: function(xml) {
>         alert("in");
>
>     complete: function(XMLHttpRequest, textStatus) {
>                 alert("comp");
>     },
>      error: function(XMLHttpRequest, textStatus, errorThrown) {
>         alert(textStatus);
>      }
>
> });
>
> Xml:
>
> <addresses><address><number>6</number></address></addresses>
>
> Any help would be great.

Reply via email to