User Guide Cancel

Location

 

Description

A function equivalent of the  cflocation  tag and is used in the <cfscript> mode.

Parameters

Same as the <cflocation> tag.

Category

Data output functions

Function syntax

location(url, addtoken, statusCode);
location(url, addtoken, statusCode);
location(url, addtoken, statusCode);

For positional notations, the sequence must be followed exactly in the same manner as provided in the syntax. If you do not provide one of the parameters, use an empty string instead. This does not apply to Boolean values for which you must provide proper values even if you have to skip them.

See also

cfscriptcflocation

Usage

You can call this function as name=value pair or as positional argument.

Example

<cfscript>
location(url="http://localhost:8500/administrator")
</cfscript>
<cfscript> location(url="http://localhost:8500/administrator") </cfscript>
<cfscript>
    location(url="http://localhost:8500/administrator") 
</cfscript>

Get help faster and easier

New user?