Skip to main content

Bug Tracker

Side navigation

#2109 closed enhancement (duplicate)

Opened January 03, 2008 08:45PM UTC

Closed October 26, 2010 06:11PM UTC

Last modified October 26, 2010 06:11PM UTC

Adding xhtml+xml capabitlity to ajax load()

Reported by: Max_B Owned by:
Priority: major Milestone: 1.2.2
Component: ajax Version: 1.2.1
Keywords: +xml xhtml ajax load Cc:
Blocked by: Blocking:
Description

Currently, the load() method uses the responseText from the ajax request and innerHTML.

If the server send application/xhtml+xml content-type header the responseXML is returned by the ajax/get/post method but is not inserted into the DOM.

One needs to manually add it in the callback with a code like:

function (data, status) {
	if (data.documentElement) targetnode.appendChild(document.importNode(data.documentElement, true));
	else targetnode.append(data);
}
Attachments (0)
Change History (4)

Changed May 12, 2008 01:07AM UTC by flesler comment:1

document.importNode doesn't exist on IE.

Changed May 12, 2008 01:07AM UTC by flesler comment:2

component: coreajax

Changed October 26, 2010 06:11PM UTC by addyosmani comment:3

keywords: → +xml xhtml ajax load
resolution: → duplicate
status: newclosed

Changed October 26, 2010 06:11PM UTC by addyosmani comment:4

Duplicate of #4958.