That's not necessarily true (that it must be known at parse time) --
though the engine for Fusebox 4 doesn't support it... it's conceivable
that the parsing engine could check for the presence of the #
character and when present replace the usual method of inclusion with
a cfmodule call to the
I would change the action of the form based on which button was pushed. For
example:
input type=button
onclick=document.formName.action='index.cfm?fuseaction=fusecircuit1'
value=Do this 1
input type=button
onclick=document.formName.action='index.cfm?fuseaction=fusecircuit2'
value=Do this 2
...
You can make the button be the fuseaction field (only clicked one is
sent), but sometimes you want a prefix.suffix style fuseaction... In
that case you can do something like this:
script language=JavaScript
function appendFA(fa){
Katz, Dov B (IT) wrote:
You can make the button be the fuseaction field (only clicked one is
sent), but sometimes you want a prefix.suffix style fuseaction... In
that case you can do something like this:
script language=JavaScript
function appendFA(fa){
PROTECTED]
Sent: Wednesday, January 12, 2005 7:03 PM
To: CF-Talk
Subject: RE: Multiple submit buttons and Fusebox
I would change the action of the form based on which button
was pushed. For
example:
input type=button
onclick=document.formName.action='index.cfm?fuseaction=fusecircuit1'
value=Do
I _think_ that with Fusebox 4 and later it's possible to use a
variable in the fuseaction in a do tag in your xml... so in theory
you could simply assign the button tag a name, then parameterize the
button name on the action page (you'd have to do this because IE
doesn't include the button value
Thanks, those are both great ideas! I guess I wasn't thinking of
Javascript, but it's a standard requirement these days, and this is
for the admin section, so we have the option to require it be enabled.
It seems like bad MVC practice to use another language to affect
application flow like that,
Isaac, that won't work because do tags are dealt with at parse time,
not at runtime.
You could do it like this so that you don't have to worry about
appending to the fuesaction or using the index.cfm file to figure out
what to do:
form action=index.cfm method=post
input type=hidden
Isaac, that won't work because do tags are dealt with at
parse time, not at runtime.
Good to know... I wasn't sure.
Though if not do (which would be best if available) then the
variable could be used in an include tag right?
s. isaac dealey 954.927.5117
new epoch : isn't it time for a
9 matches
Mail list logo