Well for starters... you might want to do switch opposed to doing a lot of
cfifs... its a preformance thing.... and then when you do that you name the
buttons the same thing and switch on the VALUE of the buttons not the
NAME....
Now one way of using images is with a dynamic form element.. do <input
type="hidden" name="SWITCHEDSTATMENT" value=""> with this make the images
actual images then use a link to name the function and submit the form...
<a
href="javascript:document.form[0].SWITCHEDSTATMENT.value='Actionyouwanttobep
reformed';javascript:document.form[0].submit();><img src="../myimage.gif"
border=0></a>
<a
href="javascript:document.form[0].SWITCHEDSTATMENT.value='AnotherActionyouwa
nttobepreformed';javascript:document.form[0].submit();><img
src="../myimage2.gif" border=0></a>
See if that helps any... PS. i didnt really test it so there may be syntax
issues. Sorry
Trishan Singh
ACP/CCFD
[EMAIL PROTECTED]
316-204-1097
Paracom Technologies
Suite 501
245 N Waco
Wichita KS 67202
----- Original Message -----
From: "John McCosker" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 9:48 AM
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists