P
Peter Michaux
Hi,
I've been experimenting with XMLHttpRequest in older browsers. The
first Netscape browser with XHR is Navigator 6.2 which seems to make
GET requests fine. I've tried POST requests with the following example
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
document.one.two.value="success";
}
}
xhr.open('POST', "/ajax/form", true);
xhr.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
xhr.send("foo=bar");
which is live at the following URL
<URL: http://peter.michaux.ca/ajaxPost.html>
but when I run this in NN6.2 I see the following error (paraphrased)
"Uncaught Error: Could not convert javascript argument arg 0 ... to
send()"
and if I change the argument to send() to "null" then all seems to work
well.
Does anyone here remember if NN6.2 was able to send a post body with
XMLHttpRequest? If so how? If not is there a way to feature test this
before sending the request (without sending a test request in a
try-catch block)? I searched for info but can't find anything.
Thank you,
Peter
I've been experimenting with XMLHttpRequest in older browsers. The
first Netscape browser with XHR is Navigator 6.2 which seems to make
GET requests fine. I've tried POST requests with the following example
var xhr = new XMLHttpRequest();
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
document.one.two.value="success";
}
}
xhr.open('POST', "/ajax/form", true);
xhr.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded");
xhr.send("foo=bar");
which is live at the following URL
<URL: http://peter.michaux.ca/ajaxPost.html>
but when I run this in NN6.2 I see the following error (paraphrased)
"Uncaught Error: Could not convert javascript argument arg 0 ... to
send()"
and if I change the argument to send() to "null" then all seems to work
well.
Does anyone here remember if NN6.2 was able to send a post body with
XMLHttpRequest? If so how? If not is there a way to feature test this
before sending the request (without sending a test request in a
try-catch block)? I searched for info but can't find anything.
Thank you,
Peter