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?
you cannot submit the same form to a different page based on the submit button, but you can submit the form to the same page and then detect which submit button was pressed
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.
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.