Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

two submit buttons one form

Status
Not open for further replies.

mother911

Technical User
Jul 28, 2003
15
0
0
US
yeah yeah...I know...someone has done it before but I can't find it.

I have a simple form. 4 fields, one insert, but....two different landing pages. one for each button.

fill out form, get more info page1.asp
fill out form, goto full application page2.asp

help please
Mother
 
whats up mother!
here is something that might help...have not tested it with reall DB in the back but u know what to do:
Code:
<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;>
</head>

<body>
<script>
function RUNIT(tfFIRST,tfLAST,tfEMAIL,tfCOUNTRY)
{
    document.myFORM.action=&quot;Page1.asp&quot;
	document.myFORM.method=&quot;post&quot;
	document.myFORM.tfFIRST.Value= tfFIRST
	document.myFORM.tfLAST.Value= tfLAST
	document.myFORM.tfEMAIL.Value= tfEMAIL
	document.myFORM.tfCOUNTRY.Value= tfCOUNTRY
	document.myFORM.submit();
}
</script>

<tr> 
  <form action=&quot;FINISHED.asp&quot; method=&quot;post&quot; name=&quot;myFORM&quot;>
    <p> 
      <input name=&quot;tfFIRST&quot; type=&quot;text&quot; id=&quot;tfFIRST&quot;>
    </p>
    <p> 
      <input name=&quot;tfLAST&quot; type=&quot;text&quot; id=&quot;tfLAST&quot;>
    </p>
    <p> 
      <input name=&quot;tfEMAIL&quot; type=&quot;text&quot; id=&quot;tfEMAIL&quot;>
    </p>
    <p> 
      <input name=&quot;tfCOUNTRY&quot; type=&quot;text&quot; id=&quot;tfCOUNTRY&quot;>
    </p>
    <p> 
      <input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;FINISHED&quot;>
      <input type=&quot;submit&quot; name=&quot;Submit2&quot; value=&quot;Continue...&quot; onClick=&quot;RUNIT();&quot;>
      <input type=&quot;reset&quot; name=&quot;Submit3&quot; value=&quot;Reset&quot;>
    </p>
  </form>
note: on Page1.asp u would need to Request.Forms to grab potential entry in the 
field! 
<tr>
</body>
</html>

All the best!

> need more info?
:: don't click HERE ::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top