E
eschl
Doesn't "prototype.js" support the "responseXML" property of the
XMLHttpRequest object?
var url = "test.jsp";
var pars = "";
var myAjax =
new Ajax.Request(url,
{method: 'get', parameters: pars,
onComplete: mycallback }
);
"test.jsp"
<%
String sXml;
sXml = "<?xml version='1.0' encoding='utf-8' ?>";
sXml += "<response>aaa</response>";
%>
<%=sXml%>
"callbackfunction"
function mycallback(req)
{
alert(req.responseText); // ok!
if (req.responseXML == null)
alert("does not work!");
// req.responseXML seems to be null
}
XMLHttpRequest object?
var url = "test.jsp";
var pars = "";
var myAjax =
new Ajax.Request(url,
{method: 'get', parameters: pars,
onComplete: mycallback }
);
"test.jsp"
<%
String sXml;
sXml = "<?xml version='1.0' encoding='utf-8' ?>";
sXml += "<response>aaa</response>";
%>
<%=sXml%>
"callbackfunction"
function mycallback(req)
{
alert(req.responseText); // ok!
if (req.responseXML == null)
alert("does not work!");
// req.responseXML seems to be null
}