sounds like you might want to use a url_ file (see recent "URL files types"
thread)
eg:
index.cfm:
<CFSWITCH EXPRESSION="#attributes.fuseaction#">
.....
<CFCASE VALUE="DoTransaction">
<CFINCLUDE TEMPLATE="act_transaction.cfm">
<CFINCLUDE TEMPLATE="url_after_transaction.cfm">
</CFCASE>
.....
</CFSWITCH>
act_transaction.cfm:
This file attempts the transaction then sets a variable according to the
success or failure
eg:
<CFIF the transaction worked>
<CFSET bTransactionSuccessful = "true">
<CFELSE>
<CFSET bTransactionSuccessful = "false">
</CFIF>
url_after_transaction.cfm:
Checks whether the transaction was a success or not and uses CFLOCATION to
the relevant template
<CFIF bTransactionSuccessful>
<CFLOCATION URL="index.cfm?fuseaction=SuccessfulTransaction">
<CFELSE>
<CFLOCATION URL="index.cfm?fuseaction=FailedTransaction">
</CFIF>
Bert
> -----Original Message-----
> From: ibtoad [mailto:[EMAIL PROTECTED]]
> Sent: 06 January 2001 04:17
> To: Fusebox
> Subject: RE: <cfif>??
>
>
> I want to check to see if a transaction has been successful.
> When it has
> been successful, a variable "success" is generated. When it
> fails then I
> have an error page showing the user what to do next display.
> I don't think
> I can run this through the index page without using the <cfif
> isdefined('success')>...</cfif>.
>
> Rich
>
> -----Original Message-----
> From: Brendan Avery [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 05, 2001 11:02 PM
> To: Fusebox
> Subject: RE: <cfif>??
>
>
> if you mean <cfif isdefined('whatever')>...</cfif> then you
> probably would
> want to use a <cfif> as opposed to <cfswitch>
>
> i assume the reason you're using isdefined is because you have
> different/multiple possible actions per call to index.cfm. although i
> think it makes everything a little clearer if you stick to one
> action/fuseaction/switch directive instead of multiples, as
> it makes your
> code more readable and makes explicit the possible actions per
> request. you're not going to run a search, a database update, and a
> redirect all in one request anyways...
>
> --B][A / [EMAIL PROTECTED]
>
> At 09:53 PM 1/5/2001 -0500, you wrote:
> >How can I use <cfswitch> and <cfcase> to replace a
> <cfisdefined> statement?
> >
> >Rich
> >
> >-----Original Message-----
> >From: Michael 'Maxx' Porter [mailto:[EMAIL PROTECTED]]
> >Sent: Friday, January 05, 2001 6:58 PM
> >To: Fusebox
> >Subject: Re: <cfif>??
> >
> >
> >If you are following FuseBox you should <cfswithch> <cfcase> in the
> >index.cfm.
> >
> >There are a few samples on www.fusebox.org
> >
> >At 06:37 PM 1/5/01 -0500, you wrote:
> > >Where do I put a <cfif> tag that determines which page I
> want to show?
> > >Should it go in the index page or at the top of the
> display page? I am
> > >trying to follow the fusebox setup.
> > >
> > >Rich
> > >
> > >
> > >
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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