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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two buttons to post the same data To 2 different page

Status
Not open for further replies.

Injun

IS-IT--Management
Dec 17, 2002
30
US

My existing ASP page current.asp has a <form> which uses post method to another ASP page called issue.asp.

I need to add another button which will post the same data to another page called feedback.asp from current.asp

How can I get this done?
 
You have to either use client-side code to alter the form action before it submits or you have to post the form to one asp file that will read all fields into hidden form fields of a new form and then post to the correct page based on which button was pressed.

The easiest way is to alter the form action.
I would use two buttons type="button" rather than type="submit" and have each button call a function passing the name of the page to send to. In that function do a document.forms[0].action = whateverpageyouwant;
then do a document.forms[0].submit();


At my age I still learn something new every day, but I forget two others.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top