Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#266 closed enhancement (wontfix)

AJAX xml override for XHTML docs.

Reported by: jakecigar@… Owned by:
Priority: minor Milestone: 1.1a
Component: ajax Version: 1.1a
Keywords: ajax xml xhtml Cc: istruble@…
Blocked by: Blocking:

Description

Call $.ajax(parm) where parm.dataType is "xml", and the url winds up as xhtml being served as text/html the responseXML is not generated. So...

Make sure we get the dom parsed. if ( xml.overrideMimeType && dataType == "xml")

xml.overrideMimeType('text/xml');

give us the responseXML in addition to responseText

Change History (5)

comment:1 Changed 14 years ago by anonymous

Make sure we get the dom parsed.

if ( xml.overrideMimeType && dataType == "xml")

xml.overrideMimeType('text/xml');

comment:2 Changed 14 years ago by joern

Resolution: worksforme
Status: newclosed

Klaus said he doesn't see any bug here, and he is our personal mimtype god.

comment:3 Changed 14 years ago by john

Milestone: 1.1
Resolution: worksforme
Status: closedreopened
Type: bugenhancement
Version: 1.1

I think what's being driven at here is that the dataType should try harder to force the results into its specified type.

This can be done just by adding the line: if ( dataType == "xml" )

xml.overrideMimeType('text/xml');

This won't effect anyones existing XML-related code, instead it'll just help to fix a lot of the confusion that surrounds incorrect headers and Ajax. I say add those two lines!

comment:4 Changed 14 years ago by john

Actually, looking back at his code - just include it as-is. I think it's a good addition that will help to reduce the "weirdness" that people encounter when first learning Ajax.

comment:5 Changed 14 years ago by john

Resolution: wontfix
Status: reopenedclosed

I didn't realize that overrideMimeType didn't exist in IE, though. So it sounds like users will just have to tough it out for now.

Note: See TracTickets for help on using tickets.