XMLHTTPRequest.send method failing

Discussion in 'ASP .Net' started by zdrakec, Jun 21, 2007.

  1. zdrakec

    zdrakec Guest

    The relevent code (it's a basic example):

    var XMLHTTP = GetXMLHTTP();
    if(XMLHTTP != null)
    {
    XMLHTTP.open("GET","default.aspx");
    XMLHTTP.onreadystatechanged = stateChanged;
    XMLHTTP.send(null);
    } //end if(XMLHTTP != null)

    function stateChanged()
    {
    if(XMLHTTP.readyState == 4 && XMLHTTP.status == 200)
    {
    window.alert(XMLHTTP.responseText);
    } //end if
    }//end function stateChanged

    When I run this in the browser, I get a javascript exception for the
    "XMLHTTP.send(null);" line:
    "Object does not support this property or method."

    Help...?

    Thanks,

    zdrakec
    zdrakec, Jun 21, 2007
    #1
    1. Advertising

  2. zdrakec

    Guest

    Hi!

    See attentive...

    var XMLHTTP = GetXMLHTTP();

    if(XMLHTTP != null)
    {
    XMLHTTP.open("GET","default.aspx");
    XMLHTTP.onreadystatechange = stateChanged; // SEE HERE!!!
    onreadystatechangE (you write - onreadystatechangED). Correct.
    XMLHTTP.send(null);



    } //end if(XMLHTTP != null)


    function stateChanged()
    {
    if(XMLHTTP.readyState == 4 && XMLHTTP.status == 200)
    {
    window.alert(XMLHTTP.responseText);
    } //end if
    }//end function stateChanged

    }
    , Jun 22, 2007
    #2
    1. Advertising

  3. zdrakec

    zdrakec Guest

    On Jun 21, 10:46 pm, wrote:
    > Hi!
    >
    > See attentive...
    >
    > var XMLHTTP = GetXMLHTTP();
    >
    > if(XMLHTTP != null)
    > {
    > XMLHTTP.open("GET","default.aspx");
    > XMLHTTP.onreadystatechange = stateChanged; // SEE HERE!!!
    > onreadystatechangE (you write - onreadystatechangED). Correct.
    > XMLHTTP.send(null);
    >
    > } //end if(XMLHTTP != null)
    >
    > function stateChanged()
    > {
    > if(XMLHTTP.readyState == 4 && XMLHTTP.status == 200)
    > {
    > window.alert(XMLHTTP.responseText);
    > } //end if
    > }//end function stateChanged
    >
    >
    >
    > }- Hide quoted text -
    >
    > - Show quoted text -


    Well dammit. That is truly annoying, and convinces me that I'm getting
    senile.

    Thank you sir!

    zdrakec
    zdrakec, Jun 22, 2007
    #3
    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. TJO
    Replies:
    4
    Views:
    105
    Thomas 'PointedEars' Lahn
    Jan 20, 2006
  2. Replies:
    3
    Views:
    117
  3. kj
    Replies:
    4
    Views:
    295
    webEater
    Dec 22, 2006
  4. Peter Michaux

    XMLHttpRequest.send() argument in Netscape 6.2

    Peter Michaux, Jan 13, 2007, in forum: Javascript
    Replies:
    0
    Views:
    113
    Peter Michaux
    Jan 13, 2007
  5. ithinc
    Replies:
    4
    Views:
    259
    Thomas 'PointedEars' Lahn
    Apr 18, 2008
Loading...

Share This Page