CHAPTER 6
Extending ColdFusion Pages with CFML Scripting
ColdFusion MX offers a server-side scripting language, CFScript, that provides ColdFusion
functionality in script syntax. This JavaScript-like language gives developers the same control flow
as ColdFusion, but without tags. You can also use CFScript to write user-defined functions that
you can use anywhere that a ColdFusion expression is allowed.
This chapter describes the CFScript language's functionality and syntax, and provides
information on using CFScript effectively in ColdFusion pages.
Contents
About CFScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
The CFScript language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
Using CFScript statements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Handling exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
CFScript example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
127
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