Creating And Using Variables In Scopes - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Creating and using variables in scopes

The following table shows how you create and refer to variables in different scopes in your code.
For more information on the mechanisms for creating variables in most scopes, see
variables" on page
Scope
Prefix
prefix
required to
(type)
reference
Variables
No
(Local)
Form
No
URL
No
Attributes
Yes
Caller
On the custom
tag page, Yes.
On the calling
page, No
(Variables prefix
is optional).
ThisTag
Yes
Request
Yes
CGI
No
54.
Where available
On the current page. Cannot
be accessed by a form's
action page (unless the form
page is also the action page).
Variables in this scope used
on a page that calls a custom
tag can be accessed in the
custom tag by using its Caller
scope; however, they are not
available to any nested
custom tags.
On the action page of a form
and in custom tags called by
the action page; cannot be
used on a form page that is
not also the action page.
On the target page of the
URL.
On the custom tag page.
On the custom tag page, by
using the Caller scope prefix.
On the page that calls the
custom tag, as local variables
(Variables scope).
On the custom tag page.
On the creating page and in
any pages invoked during the
current HTTP request after
the variable is created,
including in custom tags and
nested custom tags.
On any page. Values are
specific to the latest browser
request.
"Creating
Created by
Specifying the prefix Variables, or
using no prefix, when you create the
variable.
A
or
tag. Contains the
cfform
form
values of form field tags (such as
input) in the form body when the
form is submitted. The variable
name is the name of the form field.
The system. Contains the
parameters passed in the URL
query string used to access the
page.
The calling page passing the values
to a custom tag page in the custom
tag's attributes.
On the custom tag page, by
specifying the prefix Caller when
you create the variable.
On the calling page, by specifying
the prefix Variables, or using no
prefix, when you create the variable.
Specifying the prefix ThisTag when
you create the variable in the tag or
using the
cfassociate
nested custom tag.
Specifying the prefix Request when
you create the variable.
The web server. Contains the server
environment variables that result
from the browser request.
About scopes
tag in a
75

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents