In my html script I use XMLHTTP to post an xml document to the server. The server program has to send an answer to the client.
In the ASP I send "successful" back to the client.
But on the clientside I do not get back the "successful", I get an empty page.
What is the problem?
Thanks.
Ilse
Here is my clientside script:
function Save() {
var myXMLDoc;
var myXMLHttp;
var strXML;
strXML = "<Root><Item>ID1</Item><Item>ID2</Item></Root>";
myXMLDoc = new ActiveXObject('Msxml2.DOMDocument');
myXMLDoc.async = false;
myXMLDoc.loadXML(strXML);
myXMLHttp = new ActiveXObject('Msxml2.XMLHTTP');
myXMLHttp.open('POST', ' false);
myXMLHttp.send(myXMLDoc);
document.write(myXMLHttp.responseText);
}
This is the ASP code:
<%@ LANGUAGE="JSCRIPT" %>
<%
var myXMLDoc = Server.CreateObject("Msxml2.DOMDocument");
var strOutFile;
myXMLDoc.load(Request);
strOutFile = "Test.xml";
myXMLDoc.save(Server.MapPath(strOutFile));
response.write("Successful");
%>
In the ASP I send "successful" back to the client.
But on the clientside I do not get back the "successful", I get an empty page.
What is the problem?
Thanks.
Ilse
Here is my clientside script:
function Save() {
var myXMLDoc;
var myXMLHttp;
var strXML;
strXML = "<Root><Item>ID1</Item><Item>ID2</Item></Root>";
myXMLDoc = new ActiveXObject('Msxml2.DOMDocument');
myXMLDoc.async = false;
myXMLDoc.loadXML(strXML);
myXMLHttp = new ActiveXObject('Msxml2.XMLHTTP');
myXMLHttp.open('POST', ' false);
myXMLHttp.send(myXMLDoc);
document.write(myXMLHttp.responseText);
}
This is the ASP code:
<%@ LANGUAGE="JSCRIPT" %>
<%
var myXMLDoc = Server.CreateObject("Msxml2.DOMDocument");
var strOutFile;
myXMLDoc.load(Request);
strOutFile = "Test.xml";
myXMLDoc.save(Server.MapPath(strOutFile));
response.write("Successful");
%>