XMLHttpRequest.send() argument in Netscape 6.2

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
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top