Problem with XMLHttpRequest.Send('stringdata=foo')

Discussion in 'Javascript' started by TJO, Jan 19, 2006.

  1. TJO

    TJO Guest

    I am executing the following JavaScript to initiation a post to another
    page on my site. I need to retreive the string data being sent in the
    ..send() method. However, I cannot locate the string anywhere? I am
    inspecting the Request object in MyPostPage.aspx is this correct?
    Where else should I be looking to get a handle on the 'foo=bar' string?
    Thank you in advance.

    http_request = new XMLHttpRequest();
    http_request.setRequestHeader = 'Content-Type',
    'application/x-www-form-urlencoded';
    http_request.overrideMimeType('text/xml');
    http_request.onreadystatechange = ServerResponseHandler;
    http_request.open('POST', 'http://localhost/MyPostPage.aspx', true);
    http_request.send('foo=bar')
     
    TJO, Jan 19, 2006
    #1
    1. Advertising

  2. TJO

    TJO Guest

    Thanks but i am not sure how to go about that one. The code seems
    simple enough does anyone else have an idea as to why I cannot locate
    the "foo=bar" string in my Request object?
     
    TJO, Jan 20, 2006
    #2
    1. Advertising

  3. TJO wrote:

    > I am executing the following JavaScript to initiation a post to another
    > page on my site. I need to retreive the string data being sent in the
    > .send() method. However, I cannot locate the string anywhere?


    I do not know. Can you? ;-)

    > I am inspecting the Request object in MyPostPage.aspx is this correct?


    It is.

    > Where else should I be looking to get a handle on the 'foo=bar' string?
    > [...]
    > http_request.open('POST', 'http://localhost/MyPostPage.aspx', true);
    > http_request.send('foo=bar')


    Request.Form() // should evaluate to "foo=bar"
    Request.Form("foo") // should evaluate to "bar"

    <URL:http://msdn.microsoft.com/library/en-us/iissdk/html/ef3a75f3-aaff-4f0e-b52f-3206c0886476.asp>

    > Thank you in advance.


    You're welcome. Please RTFM next time before you post, TIA.


    PointedEars
     
    Thomas 'PointedEars' Lahn, Jan 20, 2006
    #3
  4. TJO

    rkc Guest

    TJO wrote:
    > Thanks but i am not sure how to go about that one. The code seems
    > simple enough does anyone else have an idea as to why I cannot locate
    > the "foo=bar" string in my Request object?


    request.form("foo")
     
    rkc, Jan 20, 2006
    #4
  5. Ian Collins wrote:

    > TJO wrote:
    >> Thanks but i am not sure how to go about that one. The code seems
    >> simple enough does anyone else have an idea as to why I cannot locate
    >> the "foo=bar" string in my Request object?
    >>

    > What one? Please quote.


    Do not feed the troll.
     
    Thomas 'PointedEars' Lahn, Jan 20, 2006
    #5
    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. Alex Vinokur
    Replies:
    7
    Views:
    453
    Jerry Coffin
    Sep 21, 2003
  2. Alex Vinokur
    Replies:
    4
    Views:
    489
    Ron Natalie
    Sep 24, 2003
  3. Replies:
    3
    Views:
    399
    John Roth
    Jul 29, 2005
  4. .rhavin grobert

    vector: Foo[5] == ((foo*)Foo) + 5 ?

    .rhavin grobert, Sep 23, 2008, in forum: C++
    Replies:
    4
    Views:
    414
    JaredGrubb
    Sep 24, 2008
  5. Replies:
    4
    Views:
    164
    Thomas 'PointedEars' Lahn
    Dec 23, 2007
Loading...

Share This Page