what you are describing is not possible (as far as I know). I know it may
*seem* like that's what's happening, but something else is going on here...
Perhaps one of these is happening...
1. the custom tag may be called somewhere else as well and you don't
realize it...
2. the cflocate is somehow taking you back to the same page, but the second
time around the form variables don't exist...
3. you have an OnRequestEnd.cfm file executing the custom tag
4. you're inadvertantly mixing up two files of the same name. I do this
sometimes when I have multiple versions of a file in different directories.
who knows... could be anything. Good luck :)
+-----------------------------------------------+
Bryan Love
Macromedia Certified Professional
Internet Application Developer
Database Analyst
Telecommunication Systems
[EMAIL PROTECTED]
+-----------------------------------------------+
"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis
-----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.
______________________________________________________________________
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