Help with the POST method

G

gtg489w

I'm having trouble reading data that i send to the server using ajax.
The call I'm making in the client-side javascript is:

fullProject.open("POST", url, false);
fullProject.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
fullProject.send('var1=' + projectData);

and I want to know how to grab that data using asp. The call that I've
been manipulating is

<%
response.write "data: " & request("var1")
%>

That hasn't been working, and all I've been receiving back is the
string "data: ". Any help would be greatly appreciated!!
 
E

Evertjan.

wrote on 19 jan 2007 in microsoft.public.inetserver.asp.general:
I'm having trouble reading data that i send to the server using ajax.
The call I'm making in the client-side javascript is:

fullProject.open("POST", url, false);
fullProject.setRequestHeader('Content-Type','application/x-www-for
m-urlencoded'); fullProject.send('var1=' + projectData);

Without the definition of fullProject I cannot say,
it seems probable that your clientside code is at fault.
and I want to know how to grab that data using asp. The call that
I've been manipulating is

<%
response.write "data: " & request("var1")
%>

That hasn't been working, and all I've been receiving back is the
string "data: ". Any help would be greatly appreciated!!

"Not working" always needs a complete explanation.
like "16 amp. mains fuse blows" or: shows "data: $$$&^%$@"

However the ASP, if it is asp-vbs, looks workable although not safe.
Other request collection values could get in the way.

Try:

<%
response.write "data: " & request.form("var1")
%>

In general, do not try to invent the wheel in to places at the same time.
I would first make a simple <form method='post' and try out the ASP,
and if that works go for the clientside xmlhttp in javascript..
 

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,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top