Help with the POST method

Help with the POST method

am 19.01.2007 21:02:32 von 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-w ww-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!!

Re: Help with the POST method

am 19.01.2007 21:42:36 von exjxw.hannivoort

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-w ww-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

and if that works go for the clientside xmlhttp in javascript..

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)