Results 1 to 4 of 4

Thread: Passing On Variables

  1. #1

    Thread Starter
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209

    Passing On Variables

    Let's say I have 2 web pages. On the first one, the user enters text into a text field, and selects 2 options from 2 different drop-down menus.

    Then the user clicks the submit button.

    How do I display the user's selections on the second page, using client-side scripting/cookies.

  2. #2
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    India
    Posts
    276
    I assume that you are talking about select combo(s) thr...
    Here goes a sample code using ASP:

    Code:
    Page1.asp
    
    <Form name=myForm method=Post action=page2.asp>
    <Input type=text value="" name=MyText>Enter text here
    <br>
    <select name=dropdown1>
    <option value="one">One
    <option value="two">Two
    <option value="three">Three
    </select>
    <select name=dropdown2>
    <option value="First">First
    <option value="Second">Second
    <option value="Third">Third
    </select>
    <br>
    <input type=submit value=Submit>
    </Form>
    
    Page2.asp
    <%
    response.write request.form("MyText")
    response.write "<br>" & request.form("dropdown1")
    response.write "<br>" & request.form("dropdown2")
    %>
    If you have any queries on this or anything else, do post back.

    - Jemima.
    Last edited by JemimaChadwick; Sep 23rd, 2001 at 11:51 PM.

  3. #3

  4. #4

    Thread Starter
    PowerPoster eiSecure's Avatar
    Join Date
    Jul 2000
    Location
    Texas
    Posts
    2,209
    Actually, I solved it myself...

    It involves using Javascript and cookies. I didn't want to pass the variables in the address because that would be a security weakness, since the page is for a bank's website's transaction page.

    Thanks anyways.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width