In addition to the ways already presented you can try something like this
Put however many buttons you want on the form. Give them the same name but
different values.
Imagine a form with two input boxes for two numbers and four buttons as
follows.
<INPUT TYPE="Submit" NAME="Submit" VALUE="Add">
<INPUT TYPE="Submit" NAME="Submit" VALUE="Subtract">
<INPUT TYPE="Submit" NAME="Submit" VALUE="Multiply">
<INPUT TYPE="Submit" NAME="Submit" VALUE="Divide">
When the form is submitted, you can interrogate form.submit as follows to
determine which button was pressed.
<CFSWITCH EXPRESSION="#form.submit#">
<CFCASE VALUE="Add">
<CFINCLUDE TEMPLATE="actions/act_addnumbers.cfm">
</CFCASE
<CFCASE VALUE="Subtract">
<CFINCLUDE TEMPLATE="actions/act_subtractnumbers.cfm">
</CFCASE>
<CFCASE VALUE="Multiply">
<CFINCLUDE TEMPLATE="actions/act_multiplynumbers.cfm">
</CFCASE
<CFCASE VALUE="Divide">
<CFINCLUDE TEMPLATE="actions/act_dividenumbers.cfm">
</CFCASE>
</CFSWITCH
Erik
----- Original Message -----
From: "W Luke" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, April 29, 2001 1:07 PM
Subject: One form, two submit buttons...
> Hi,
>
> I have a form that is posted to a processing page. I want to add another
> button that submits the form information to another page, if the user
> wishes, which will preview what it will look like.
>
> How can I do this?
>
> Cheers.
>
> --
> Will
> Free Classifieds -=- www.localbounty.com
> e: [EMAIL PROTECTED] icq: 31099745
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists