Bug Tracker

Opened 16 years ago

Closed 13 years ago

Last modified 13 years ago

#2109 closed enhancement (duplicate)

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);
}

Change History (4)

comment:1 Changed 15 years ago by flesler

document.importNode doesn't exist on IE.

comment:2 Changed 15 years ago by flesler

Component: coreajax

comment:3 Changed 13 years ago by addyosmani

Keywords: +xml xhtml ajax load added
Resolution: duplicate
Status: newclosed

comment:4 Changed 13 years ago by addyosmani

Duplicate of #4958.

Note: See TracTickets for help on using tickets.