Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

XMLHTTP : Post data to server ASP

Status
Not open for further replies.

IlseDC

Programmer
Mar 24, 2003
49
BE
In my HTML I have script to send XML to an ASP.
The ASP has to send an answer to the client script.

I tried the example on but it doesn't work. I don't get an answer from the server ASP.

Does anyone know why I get no anwser from the server ASP.
I get an empty white page in my browser.

Here is my Code:

------------------------------
* Client script in HTML page *
------------------------------

<html>
<head>
<script>
function Test() {

var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")
xmlHttp.open("POST", "test.asp", false)
xmlHttp.send("<Test><Code>ID1</Code></Test>")
document.write(xmlHttp.responseText)
}
</script>
</head>
<body>
<INPUT id="Button1" type="button" value="Button" name="Button1" onclick="Test();">
</body>
</html>

-------------------
* Server side ASP *
-------------------

<%@ LANGUAGE="JSCRIPT" %>

<%

var xmldoc = Server.CreateObject("Microsoft.XMLDOM");
var text;

xmldoc.async=false;
xmldoc.load(Request);
text = "OK";

response.write(text);

%>


Thanks.
Ilse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top