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

T

TJO

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')
 
T

TJO

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?
 
T

Thomas 'PointedEars' Lahn

TJO said:
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"

Thank you in advance.

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


PointedEars
 
R

rkc

TJO said:
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")
 

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

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top