Skip to main content

Bug Tracker

Side navigation

#266 closed enhancement (wontfix)

Opened October 10, 2006 06:52PM UTC

Closed November 17, 2006 06:50PM UTC

Last modified June 21, 2007 04:03AM UTC

AJAX xml override for XHTML docs.

Reported by: jakecigar@gmail.com Owned by:
Priority: minor Milestone: 1.1a
Component: ajax Version: 1.1a
Keywords: ajax xml xhtml Cc: istruble@gmail.com
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

Attachments (0)
Change History (5)

Changed October 10, 2006 06:53PM UTC by anonymous comment:1

// Make sure we get the dom parsed.

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

xml.overrideMimeType('text/xml');

Changed November 17, 2006 02:58PM UTC by joern comment:2

resolution: → worksforme
status: newclosed

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

Changed November 17, 2006 05:23PM UTC by john comment:3

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!

Changed November 17, 2006 05:25PM UTC by john comment:4

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.

Changed November 17, 2006 06:50PM UTC by john comment:5

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.