<CFRETURN> Tag - ColdFusion
>> Return to ColdFusion Tag Index
The <CFRETURN> tag allows you ...
<CFRETURN> Comments from Macromedia LiveDocs
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-a28.htm
Yes, cfreturn stops processing at the point you call it.
Yes, you can have several cfreturns within a cffunction.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-a28.htm
Does CFRETURN stop processing the code within a CFFUNCTION, or does it keep executing the code until </CFFUNCTION>, and then return the value specified ?
If it exits immediately, this means that we could have several CFRETURNs within a CFFUNCTION block ?
Ex:
<CFIF xxxxx>
[...code...]
<CFRETURN ErrorMsg1>
<CFELSEIF yyyy>
[...code...]
<CFRETURN ErrorMsg2>
<CFELSE>
[...code...]
<CFRETURN NoErrMsg>
</CFIF>
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-a28.htm
This doesn't appear to be documented anywhere, but in building custom tags, I've found that <cfreturn> can be used to break out of an execution mode (start primarily), without causing the tag processing to be stopped (like <cfexit> seems to do).
[Top]
Recommended Books
COLDFUSION MX Web Application Construction Kit (5th Edition)
Authors: Ben Forta and Nate Weiss
1500 pages
[Top]
Web Sites
Macromedia
The makers of ColdFusion/ColdFusion MX.
ColdFusion Developer's Journal
Forta.com (ColdFusion Section)
Ben Forta is Macromedia's Senior Technical Evangelist. Here on his site find useful ColdFusion information.
Flash CFM
Flash and ColdFusion Development.
Handling file uploads without CFFILE
BLOG post by "Sam" on REWINDLIFE.COM gives insight into how to upload a file on your site if you are not allowed to use the CFFILE tag.
[Top]
Copyright © 2003- 2008, Orville Paul Chomer, All Rights Reserved
Home Page
Blog
How To
Chomer TV
The Show
Webcam Videos
Freeware
•
VB Mahjongg
Coding
•
ColdFusion
•
Javascript
•
Visual Basic
Other Places
Acoustic Eidolon
History Singers
Scobleizer
Beach Walks
Freshtopia
CSS Zen Garden