How do I get data from different forms on a single page in classic asp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • TheQuestor
    New Member
    • Sep 2014
    • 1

    How do I get data from different forms on a single page in classic asp

    Say I have 3 forms on one page.
    Code:
    <form name"form1" method="post" action="/?mode=1">
    <input type="text" name="fm1txt1" value="" />
    <input type="Submit" value="Update" name="txtUD" id="txtUD" />
    </form>
    
    <form name"form2" method="post" action="/?mode=2">
    <input type="text" name="fm1txt2" value="" />
    <input type="Submit" value="Update" name="txtUD" id="txtUD" />
    </form>
    
    <form name"form3" method="post" action="/?mode=3">
    <input type="text" name="fm1txt3" value="" />
    <input type="Submit" value="Update" name="txtUD" id="txtUD" />
    </form>
    and finally
    Code:
    <form name="chout" action="/?mode=CO" method="post">
    <input type="Submit" value="Do It" name="txtCO" id="txtCO" />
    </form>
    The last form runs a function similar to this

    Code:
    TheCO = Request.Form("??")
    ThePC = Request.Form("??")
    TheCP = Request.Form("??")
    Session("TheCO") = TheCO
    Session("ThePC") = ThePC
    Session("TheCP") = TheCP
    I would like to pull TheCO from form1, ThePC from from 2, and TheCP from form3 hence the ?? in the above code.

    Is it possible? Can you name which form you wish to pull the Request.Form data from? and if so how?
Working...