Cfscript - MACROMEDIA COLDFUSION 5 - CFML Reference

Cfml reference
Hide thumbs Also See for COLDFUSION 5 - CFML:
Table of Contents

Advertisement

Alphabetical List of ColdFusion Tags

cfscript

Description
Encloses a code segment containing
Category
Web application framework tags
Syntax
<cfscript>
cfscript code goes here
</cfscript>
See also
cfapplication, cflock, cfassociate, cfmodule, cfauthenticate,
cfimpersonate
Usage
Use
following:
One use of
require
Note
If you use
cfloop
the test expression is changed by code in the loop, it may affect the number of
iterations that are executed by the loop.
For more information, see Developing ColdFusion Applications.
Example
<!--- This example shows the use of cfscript --->
<html>
<head>
<title>cfscript Example</title>
</head>
<body bgcolor = silver>
<H3>cfscript Example</H3>
<P>cfscript adds a simple scripting language to ColdFusion
for those developers who are more comfortable with JavaScript
or VBScript syntax.
<P>This simple example shows variable declaration and manipulation.
<cfif IsDefined("form.myValue")>
<cfif IsNumeric(form.myValue)>
<cfset x = form.myValue>
<cfscript>
y = x;
z = 2 * y;
StringVar = form.myString;
</cfscript>
to perform processing in
cfscript
uses ColdFusion functions, expressions, and operators
cfscript
You can read and write ColdFusion variables inside of
is to wrap a series of assignment functions that would otherwise
cfscript
statements.
cfset
around the
cfscript
attributes are re-evaluated before each iteration of the loop, and if any part of
.
cfscript
instead of CFML. Note the
cfscript
tag, any test expressions used as values to
cfloop
cfscript
247

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION 5 - CFML and is the answer not in the manual?

This manual is also suitable for:

Coldfusion 5

Table of Contents