#266 closed enhancement (wontfix)
AJAX xml override for XHTML docs.
Reported by: | 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:2 Changed 17 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Klaus said he doesn't see any bug here, and he is our personal mimtype god.
comment:3 Changed 17 years ago by
Milestone: | → 1.1 |
---|---|
Resolution: | worksforme |
Status: | closed → reopened |
Type: | bug → enhancement |
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 17 years ago by
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 17 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
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.