http://www.w3.org/TR/XMLHttpRequest/
--------------------------------------------------------------------------------
In the following example an XMLDOM document containing order information is
posted to an ASP page which returns the result as a new XML document.
function xmlpost() {
//code (client-side jscript):
var xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP");
xmlhttp.Open("POST", "http://guruserver/processorder.asp", false);
xmlhttp.Send(xmldoc);
return xmlhttp.responseXML;
}
The ASP page then loads the posted XML document, processes it, and builds an
XML document from the results:
<%
//code (server-side jscript):
Response.Expires=-1000;
var doc = Server.CreateObject("Microsoft.XMLDOM");
doc.load(Request);
// process and build resulting document
var result=Server.CreateObject("Microsoft.XMLDOM");
Response.ContentType="text/xml";
result.save(Response);
%>
--------------------------------------------------------------------------------
A function to return a cross-browser XMLHTTP Object:
function getXMLHttpObj(){
if(typeof(XMLHttpRequest)!='undefined')
return new XMLHttpRequest();
var axO=['Msxml2.XMLHTTP.6.0', 'Msxml2.XMLHTTP.4.0',
'Msxml2.XMLHTTP.3.0', 'Msxml2.XMLHTTP', 'Microsoft.XMLHTTP'], i;
for(i=0;i