XMLHttpRequest.send() argument in Netscape 6.2

Discussion in 'Javascript' started by Peter Michaux, Jan 13, 2007.

  1. 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
    Peter Michaux, Jan 13, 2007
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. zdrakec

    XMLHTTPRequest.send method failing

    zdrakec, Jun 21, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    892
    zdrakec
    Jun 22, 2007
  2. TJO
    Replies:
    4
    Views:
    105
    Thomas 'PointedEars' Lahn
    Jan 20, 2006
  3. Replies:
    3
    Views:
    117
  4. kj
    Replies:
    4
    Views:
    296
    webEater
    Dec 22, 2006
  5. edai
    Replies:
    1
    Views:
    86
Loading...

Share This Page