Look at the form dump at the bottom of the cfdebugging (if you have it
turned on in your CFSERVER). You'll notice that you can check for input's of
type image. For instance:
<INPUT TYPE="image" NAME="Process" SRC="process.gif">
You can then check for that particular button press using this code:
<CFIF ISDEFINED("form.process.x")>
-Nate
-----Original Message-----
From: John McCosker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 22, 2001 10:48 AM
To: CF-Talk
Subject: submit buttons
Has anyone worked a way round this?
I have a form with multible submit buttons, each submit will perform a
different procedure when submitted.
I want to use the name attribute of each button to define my conditions in
the next template e.g.
<input type="submit" name="process" value="Process Order">
<input type="submit" name="calculate" value="Calculate">
<input type="submit" name="compare" value="Compare">
<cfif isdefined("process")>
process..
<cfelse>
<cfif isdefined("calculate")>
calculate..
<cfelse>
<cfif isdefined("compare")>
compare..
</cfif>
</cfif>
</cfif>
The only problem is the design team insist on using graphics for the form
buttons
the name attribute does not work with
<input type="image" name="compare" src="../../images/compare.gif">
neither do they want to use a class attribute and style the button which
would work..
I know I could pretermine their decision making and send them to one of
three forms but its going to mean more work for me.
I like this way because its cleaner.
If anyone worked a way round this I would appreciate to hear from you.
Cheers
JMC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists