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!

More than one submit button in the same form

Status
Not open for further replies.

BettyGay

Programmer
Feb 23, 2005
12
US
I need to have 4 different submit buttons submit the same form to 4 different process pages. How do I do this? Or should I submit all the buttons to the same process page and then check in the page to see which button was pushed. Can I do it that way?
 
that's not 100% true. you can have one submit button change the action of the form using javascript.

something like
<input type = "submit" value = "go to different page" name = "submit" onclick = "document.forms[0].action = 'someotherpage.cfm'">

that isn't tested but i'm pretty sure that would work, or something like it.

with that said, i think i've only done it once because depending on which button was pressed it would go to a different output page that required the form variables. it was easier than using one page wrapped in cfif's.

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
I agree, i used it in a controled environment. IE only intranet. in that case it isn't such a bad idea.

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top