cflocation

Description

Opens a ColdFusion page or HTML file. For example, you might use cflocation to specify a standard message or response that you use in several ColdFusion applications. Use the addToken attribute to verify client requests.

Category

Flow-control tags

Syntax


<cflocation url = "url" addToken = "Yes" or "No"> 

See also

cfabort, cfbreak, cfexecute, cfexit, cfif    cfelseif    cfelse, cfloop, cfswitch    cfcase    cfdefaultcase, cfthrow, cftry cfcatch

Attributes

Attribute
Description
url
The URL of the HTML file or CFML page to open.
addToken
Optional. Yes or No. clientManagement must be enabled (see cfapplication). Yes appends client variable information to the URL you specify in the url attribute.

Usage


Warning

Do not set a cookie variable on a page on which you use the cflocation tag. If you do, the cookie is never saved on the browser. Likewise, if you use a cookie to store a client variable, the client variable is never set.


Example

<!--- This view only example shows the use of cflocation --->

<html>

<head>

<title>cflocation Example</title>

</head>



<body>

<H3>cflocation Example</H3>

<P>cflocation redirects the browser to a specified web resource;

normally, you would use this tag to go to another CF template or to 

an HTML file on the same server. The addToken attribute allows you to

send client information to the target page.

<P>The following is example code to direct you back to 

the CFDOCS home page (remove the comments and this information will

display within the frame):

<!--- <cflocation url = "../cfdocs/index.htm" addToken = "No"> --->



</body>

</html>    



Banner.Novgorod.Ru