Stops page execution and opens a ColdFusion page or HTML file.
Flow-control tags, Page processing tags
<cflocation url = "url" addToken = "Yes" or "No">
cfabort, cfbreak, cfexecute, cfexit, cfif, cfloop, cfswitch, cfthrow, cftry
You might write a standard message or response in a file, and call it from several applications. You could use this tag to redirect the user's browser to the standard file.
If you use this tag after the cfflush tag on a page, an error is thrown.
Warning: Do not set a cookie variable on a page on which you use this tag. If you do, the cookie is not saved on the browser. Similarly, if you use a cookie to store a client variable, the client variable is not set.
<!--- This view-only example shows the use of cflocation ---> <h3>cflocation Example</h3> <p>This tag redirects the browser to a web resource; normally, you would use this tag to go to a CF page or an HTML file on the same server. The addToken attribute lets you send client information to the target page. <p>This code redirects you to CFDOCS home page (if you remove the comment marks, this information displays in frame): <!--- <cflocation url = "../cfdocs/index.htm" addToken = "No"> --->
ColdFusion 9 | ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6
Comments are no longer accepted for ColdFusion MX. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6/CFML_Reference/Tags-pt166.htm
Comments
sgilson102 said on Aug 12, 2002 at 9:28 PM : Wolfverine said on Jan 16, 2003 at 11:10 AM : byteback said on Jun 30, 2003 at 5:41 PM : hlichtin said on Jul 1, 2003 at 4:01 PM : webucator said on Jul 23, 2003 at 1:34 PM : philklein said on Jan 24, 2004 at 9:25 AM : cousett said on Dec 11, 2004 at 11:18 AM : No screen name said on Nov 4, 2006 at 10:43 AM :