Help with the POST method

Discussion in 'ASP General' started by gtg489w@gmail.com, Jan 19, 2007.

  1. Guest

    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!!
     
    , Jan 19, 2007
    #1
    1. Advertising

  2. Evertjan. Guest

    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..

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jan 19, 2007
    #2
    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. Oleg
    Replies:
    0
    Views:
    1,198
  2. Sridhar Hegde
    Replies:
    2
    Views:
    2,548
    Ajeetha Kumari
    Sep 13, 2004
  3. Vishal
    Replies:
    1
    Views:
    696
    Steve C. Orr [MVP, MCSD]
    Dec 21, 2004
  4. Don Glover the younger

    ASP, FORMS, POST METHOD And Post with out form(???)

    Don Glover the younger, Jul 13, 2003, in forum: ASP General
    Replies:
    0
    Views:
    495
    Don Glover the younger
    Jul 13, 2003
  5. Kyung won Cheon
    Replies:
    0
    Views:
    216
    Kyung won Cheon
    Nov 21, 2008
Loading...

Share This Page