Nothing else is processed after a <cflocation> or <cfcontent> tag. In
this case of <cflocation> uses <cfheader> instead and you won't have a
problem.

-Matt

> -----Original Message-----
> From: Dave Carabetta [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 30, 2002 5:19 PM
> To: CF-Talk
> Subject: CFABORT after CFLOCATION?
> 
> OK, I'm stumped. I know this post may be a bit long, but if you have
good
> experience with CFLOCATION, *please* help me out here. I'm going
crazy!
> 
> I've been using forms that submit to themselves for a long time now.
> Nothing
> tricky: form submits to itself, detect the name of the submit button,
run
> the form processing code, and then CFLOCATE back to the main page:
> 
> <cfif IsDefined("form.next")>
>     <!--- form processing code here --->
>     <cflocation url="mainpage.cfm" addToken="no">
> </cfif>
> 
> Here's my problem. I have code that executes after the above piece of
code
> which displays the form (because the submit button hasn't been pressed
> yet).
> However, I'm finding that a custom tag call that I make after the
above
> CFIF
> block is executing before the page is CFLOCATed to the main page. For
> example:
> 
> <cfif IsDefined("form.next")>
>     <!--- form processing code here --->
>     <cflocation url="mainpage.cfm" addToken="no">
> </cfif>
> 
> <cf_customtag>
> 
> This results in the custom tag executing, even though the form.next
button
> is defined and the code within that block is definitely processing.
> 
> My question is: Why is the custom tag executing? Shouldn't the page
stop
> processing after the cflocation call? If I put a CFABORT directly
after
> the
> CFLOCATION call *within* the CFIF block, the custom tag still
executes.
> However, if I place the CFABORT above the custom tag call, but
*outside*
> of
> the CFIF block, the page properly CFLOCATEs and the custom tag is not
> called.
> 
> Another test I ran was to put the form display code (with the custom
tag)
> in
> a CFELSE block, but the custom tag *still* executed even though
form.next
> is
> defined:
> 
> <cfif IsDefined("form.next")>
>     <!--- form processing code here --->
>     <cflocation url="mainpage.cfm" addToken="no">
> <cfelse>
>     <cf_customtag>
>     <!--- rest of form display code here --->
> </cfif>
> 
> Man I'm stumped. Does this have to do with the inner workings of the
> CFLOCATION tag and the HTTP redirect header? I'm using CF 4.5.2 on
Solaris
> using Apache 1.3.6. The crazy part is that the page is properly
> CFLOCATing,
> but that custom tag is still executing.
> 
> Any ideas?
> 
> Thanks in advance,
> Dave.
> 
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.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

Reply via email to