XML HTTP POST Messaging

K

KEN

So I am just trying to test posting xml to a page and saving that xml
file to read later (see code) below. The problem is that nothing
runs or happens at all. I am not sure if its the getting of the doc or
the sending and I am not sure what to troubleshoot first. any help
would be great.

<script type="text/javascript">
var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
xmlHttp.open("GET", "note.xml", false)
document.write(xmlHttp.open("GET", "note.xml", false))

xmlHttp.open("POST", "Default.asp", false)
xmlHttp.send(xmlDoc)
</script>
<%
Dim CREATE_FILE_DATE_NAME
set XML_DOCUMENT_TO_SAVE = Server.CreateObject("Microsoft.XMLDOM")
XML_DOCUMENT_TO_SAVE.async=false
XML_DOCUMENT_TO_SAVE.load(request)
CREATE_FILE_DATE_NAME = Date()
CREATE_FILE_DATE_NAME = Replace(CREATE_FILE_DATE_NAME, "/", "")
'Response.Write("E:\" & CREATE_FILE_DATE_NAME & ".xml")
XML_DOCUMENT_TO_SAVE.Save("E:\Websites\MSIMAGING\services\notes.xml")
%>
 
B

Bjoern Hoehrmann

* KEN wrote in comp.text.xml:
So I am just trying to test posting xml to a page and saving that xml
file to read later (see code) below. The problem is that nothing
runs or happens at all. I am not sure if its the getting of the doc or
the sending and I am not sure what to troubleshoot first. any help
would be great.

<script type="text/javascript">
var xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")
xmlHttp.open("GET", "note.xml", false)
document.write(xmlHttp.open("GET", "note.xml", false))

xmlHttp.open("POST", "Default.asp", false)
xmlHttp.send(xmlDoc)
</script>

Well here you are not .send()ing the first request at all, and the
document you are trying so send with the second request does not
exist, at least not if this is the whole code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,829
Latest member
PIXThurman

Latest Threads

Top