#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    CA, USA
    Posts
    34
    Rep Power
    12

    How to get the result returned by a form?


    Hello all,

    here is a sample html:

    <HTML>
    <HEAD><TITLE>Request.htm</TITLE></HEAD>

    <BODY>
    <H2>Sample</H2>
    <P>
    Please provide the following information, then click Submit:

    <FORM METHOD="GET" ACTION="answer.asp">
    <P>
    P string: <INPUT NAME="p" SIZE="48" Value="1">
    <P>
    <P><INPUT TYPE=SUBMIT VALUE="Submit"><INPUT TYPE=RESET VALUE="Reset">
    </FORM>

    </BODY>

    </HTML>

    the problem is that the answer.asp is in another server and I want to parse the results its returns (txt format), put in a table, and then send to the client. any good ideas? (html, asp, javascript, or php as long as it can solve this problem)

    thanks guys in advance
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    NJ
    Posts
    428
    Rep Power
    16
    As long as the method you are using is "GET" then all the values from the form will be in the querystring, in which case it doesn't matter that answers.asp is on another server. But why are you asking what technology to use if the file is called answer.asp? ASP is a good solution for this problem and will work just fun. On the answers.asp page, you can use the request.querysting() method to retrieve the form data. Then do whatever processing you need to do.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Location
    CA, USA
    Posts
    34
    Rep Power
    12
    Thanks imbrokn, the problem is that I cann't modify the answer.asp. It belongs to another provider, but I must use the results it returns for furture usage.
  6. #4
  7. No Profile Picture
    Overly white
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Location
    Fresno, CA
    Posts
    83
    Rep Power
    12
    So you are trying to pass information to a page on another server and then retrieve that information? I can't think of any way to do that with server side code.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2003
    Location
    Shimonoseki / JAPAN
    Posts
    58
    Rep Power
    12
    What defjamninja said.
    If you don't have access to answer.asp, you cannot process returning data.
    If you can retrieve some results on your screen when you submit your form to answer.asp, the only way I can think of is copy the info on the page and make a text file manually
    Sweet smell of a great sorrow lies over the land. Plumes of smoke rise, merge into the leaden sky. A man lies and dreams of green fields and rivers, but awakes to a morning with no reason for waking. He's haunted by the memory of lost paradise. In his youth or dream, he can't be precise. He's chained forever to a world that's departed. It's not enough, it's not enough.
    Gilmour
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    138
    Rep Power
    12
    Wouldn't it be a BIG security risk if you could just read data submitted to other peoples forms???

    If on the other hand you want to save data that you send to the form, you should do it before you send it to answer.asp.
    ie. make your own local copy of Request.html have the form on it have an action="your.asp" somewhere you can make asp work.
    Then make your.asp have a form on it pre filled
    eg.
    Code:
    <%
    
    ' do you pre processing of request("p") here
    
    %>
    
    <form name="myform" action="answer.asp" method="GET">
    <input type="hidden" name="p" value="<% Request("p")%>">
    </form>
    and then place a submit in the html body onload event handler.

    Code:
    <body onload="document.forms.myform.submit();">
    --

    ngibsonau

IMN logo majestic logo threadwatch logo seochat tools logo