Simple posting tests. This is not part of the Seamonkey build.

This commit is contained in:
vidur%netscape.com 2000-06-30 23:10:56 +00:00
parent bb95d0ddd1
commit bbd0c263ca
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,22 @@
<html>
<body>
<h1>Posting test</h1>
<script>
var x = document.implementation.createDocument("", "test", null);
x.documentElement.appendChild(document.createTextNode("Foo"));
var p = new XMLHttpRequest();
function myfunc()
{
var s = new XMLSerializer()
var d = p.responseXML;
str = s.serializeToString(d);
alert(str);
alert(p.getAllResponseHeaders());
}
p.onload = myfunc;
p.open("POST", "http://blueviper/cgi-bin/time2.cgi");
p.send(x);
</script>
</body>
</html>

View File

@ -0,0 +1,18 @@
<html>
<body>
<h1>Posting test</h1>
<script>
var x = document.implementation.createDocument("", "test", null);
x.documentElement.appendChild(document.createTextNode("Foo"));
var p = new XMLHttpRequest();
p.open("POST", "http://blueviper/cgi-bin/time2.cgi", false);
p.send(x);
var d = p.responseXML;
var s = new XMLSerializer()
str = s.serializeToString(d);
alert(str);
alert(p.getAllResponseHeaders());
</script>
</body>
</html>