H
hatsumoto
Hello,
I create an ActiveXObject("Msxml2.XMLHTTP") from my HTML page to submit
(i.e. post) XML to a server.
I can see the content of the XML response via javascript
alert(xmlhttp.responseText).
Is there a way to display the content of xmlhttp.responseText on a new
page??
I tried document.write(xmlhttp.responseText) but this does not display
the XML structure.
Thanks in advance,
Hats...
------------------------------------
<script>
var xmlhttp=false;
try
{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (E)
{
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
function submitXML()
{
xmlhttp.open("POST", "http://myurl...", true);
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4)
{
alert(xmlhttp.responseText);
//document.write(xmlhttp.responseText);
}
}
xmlhttp.setRequestHeader("Content-Type", "text/xml")
xmlhttp.send("xml data...");
}
</script>
I create an ActiveXObject("Msxml2.XMLHTTP") from my HTML page to submit
(i.e. post) XML to a server.
I can see the content of the XML response via javascript
alert(xmlhttp.responseText).
Is there a way to display the content of xmlhttp.responseText on a new
page??
I tried document.write(xmlhttp.responseText) but this does not display
the XML structure.
Thanks in advance,
Hats...
------------------------------------
<script>
var xmlhttp=false;
try
{
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
try
{
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (E)
{
xmlhttp = false;
}
}
if (!xmlhttp && typeof XMLHttpRequest!='undefined')
{
xmlhttp = new XMLHttpRequest();
}
function submitXML()
{
xmlhttp.open("POST", "http://myurl...", true);
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4)
{
alert(xmlhttp.responseText);
//document.write(xmlhttp.responseText);
}
}
xmlhttp.setRequestHeader("Content-Type", "text/xml")
xmlhttp.send("xml data...");
}
</script>