Macromedia ColdFusion - 2016 User Manual

CFML Reference
ADOBE®
COLDFUSIONSFMFBTF

Legal notices

Legal notices
Last updated 2/17/2016

Contents

Chapter 1: What's New
New and changed functions/tags in Adobe ColdFusion (2016 release) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
Elements of CFML
Using Arrays and Structures
Chapter 2: Reserved Words and Variables
Reserved Words and Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
Scope-specific built-in variables
Custom tag variables
ColdFusion tag-specific variables
CGI environment (CGI Scope) variables
Chapter 3: ColdFusion Tags
ColdFusion Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Tags in ColdFusion 10
Tag summary
Tag s by func tio n
Tag changes since ColdFusion 5
Tag s a-b
Tag s r-s
Tag s t
Tag s u- z
Tag s m- o
Tags g-h
Tag s f
Tag s d- e
Tag s p- q
Tag s j-l
Tag s i
Tag s c
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
iii
Chapter 4: ColdFusion Functions
ColdFusion Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
New Functions in ColdFusion 10
Functions by category
Function changes since ColdFusion 5
Functions a-b
Functions c-d
Functions h-im
Functions m-r
Functions in-k
Functions l
Functions t-z
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Last updated 2/17/2016
ADOBE COLDFUSION
Content s
Functions s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Functions e-g . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Chapter 5: Ajax JavaScript Functions
Ajax JavaScript Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Function summary Ajax
ColdFusion.Ajax.submitForm
ColdFusion.Autosuggest.getAutosuggestObject
ColdFusion.Layout.enableSourceBind
ColdFusion.MessageBox.getMessageBoxObject
ColdFusion.ProgressBar.getProgressBarObject
ColdFusion.MessageBox.isMessageBoxDefined
JavaScriptFunctionsinColdFusion9Update1
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Chapter 6: Script Functions Implemented as CFCs
Script Functions Implemented as CFCs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Accessing the functions
Function summary
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
ftp
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
http
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
mail
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
pdf
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
query
Script functions implemented as CFCs in ColdFusion 9 Update 1
storedproc
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
iv
Chapter 7: ColdFusion Flash Form Style Reference
Styles valid for all controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
Styles for cfform
Styles for cfformgroup with horizontal or vertical type attributes
Styles for box-style cfformgroup elements
Styles for cfformgroup with accordion type attribute
Styles for cfformgroup with tabnavigator type attribute
Styles for cfformitem with hrule or vru
Styles for cfinput with radio, checkbox, button
Styles for cftextarea tag and cfinput with text, password, or hidden type attributes
Styles for cfselect with size attribute value of 1
Styles for cfselect with size attribut
Styles for cfcalendar tag and cfinput with dateField type attribute
Styles for the cfgrid tag
Styles for the cftree tag
ColdFusion Flash Form Style Reference
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
le type attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
, image, or submit type attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
e value greater than 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Chapter 8: Application.CFC Reference
Application.CFC Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Application variables
Method summary
onAbort
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Last updated 2/17/2016
ADOBE COLDFUSION
Content s
onApplicationEnd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
onApplicationStart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
onMissingTemplate
onCFCRequest
onError
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
onRequestEnd
onRequest
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
onRequestStart
onServerStart
onSessionEnd
onSessionStart
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Chapter 9: ColdFusion Event Gateway Reference
ColdFusion Event Gateway Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
addEvent
CFEvent
CFEventclass
Constructor
Gateway development interfaces and classes
getStatus
setCFCPath
setCFCMethod
getOriginatorID
getLogger
getBuddyList
getBuddyInfo
IM gateway message sending commands
IM Gateway GatewayHelper class methods
onIncomingMessage
onIMServerMessage
onBuddyStatus
onAddBuddyResponse
onAddBuddyRequest
IM Gateway CFC incoming message methods
IM gateway methods and commands
CFML CFEvent structure
warn
info
setOriginatorID
data command
submit Multi command
submit command
setGatewayType
setGatewayID
setData
setCFCListeners
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
v
Last updated 2/17/2016
ADOBE COLDFUSION
Content s
outgoingMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193
getStatusTimeStamp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
numberOfMessagesReceived . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
numberOfMessagesSent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
removeBuddy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
removeDeny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
removePermit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
setNickName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
setPermitMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
setStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
SMS Gateway CFEvent structure and commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
SMS Gateway incoming message CFEvent structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
getStatusAsString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
getProtocolName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
getPermitMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
getPermitList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
getNickName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
getName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
getDenyList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
getCustomAwayMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
getQueueSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
getMaxQueueSize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
getHelper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
getGatewayType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
getGatewayServices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
getGatewayID_1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
getGatewayID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
getData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
getCFCTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
setCFCTimeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
getCFCPath . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
getCFCMethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
GatewayServices class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Gateway interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
GatewayHelper interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
addPermit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
addDeny . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
addBuddy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216
error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
Logger class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
stop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
CFML event gateway SendGatewayMessage data parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
restart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
vi
Last updated 2/17/2016
ADOBE COLDFUSION
Content s
fatal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
SMS gateway message sending commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
Chapter 10: ColdFusion C++ CFX Reference
C++ class overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Deprecated class methods
CCFXException class
CCFXQuery class
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
CCFXRequest class
CCFXStringSet class
ColdFusion C++ CFX Reference
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Chapter 11: ColdFusion Java CFX Reference
ColdFusion Java CFX Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
Class libraries overview
Custom tag interface
Query interface
Request interface
Response interface
Debugging classes reference
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
vii
Chapter 12: WDDX JavaScript Objects
WDDX JavaScript Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
JavaScript object overview
WddxRecordset object
WddxSerializer object
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Chapter 13: ColdFusion ActionScript Functions
ColdFusion ActionScript Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
CF.http
CF.query
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
Chapter 14: ColdFusion Mobile Functions
ColdFusion Mobile Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
Accelerometer Functions
Camera Functions
Connection Functions
Contact Functions
Event Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
File System Functions
Geolocation Functions
Media and Capture Functions
Notification Functions
Splash Screen Functions
Storage Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Last updated 2/17/2016

Chapter 1: What's New

Ne
w and changed functions/tags in Adobe ColdFusion
(2016 release)
This document lists new and changed functions/tags in Adobe ColdFusion (2016 release).

New functions

The following is a list of new functions in Adobe ColdFusion (2016 release):
ArrayContainsNoCase
ArrayDeleteNoCase
1
BooleanFormat
Floor
IsPDFArchive
QuerySort
QueryEach
QueryFilter
QueryKeyExists
QueryMap
QueryReduce
ReplaceListNoCase
SpreadsheetGetColumnCount
ValueArray

SpreadsheetAddRows

There is a new parameter, includeColumnNames, in this function. For more information, see SpreadsheetAddRows function description and examples.

ReplaceList

There is a new parameter, includeEmptyFields, in this function. For more information, see ReplaceList function description and examples.
Last updated 2/17/2016

cfapplication

There are two new attributes in the <cfapplication> tag:
1 passArrayByReference
2 searchImplicitScopes
For more information, see cfapplication .

cfsearch

The verity types, simple, explicit, internet, internet_basic, and natural no longer exist. There are two new verity types, Standard and DisMax, in the tag. For more information, see
cfsearch .

cfloop

There is a new attribute, item, in <cfloop>. The attribute, index, is now optional.
For more information, see cfloop .

cfmailparam

There is a new, optional attribute, filename, in cfmailparam.
2
For more information, see cfmailparam .

cfoutput

There is a new, optional attribute, encodefor in this tag.
For more information, see cfoutput .

cfpdf

In Adobe ColdFusion (2016 release), you can use two additional 256-bit encryption algorithms when protecting a PDF document. The algorithms are:
1 AES_256R5
2 AES_256R6
For more information, see cfpdf .

CacheRemove

The CacheRemove function has an updated syntax:
CacheRemove(Object id, boolean throwOnError, String key, boolean exact)
For more information, see CacheRemove .

TimeFormat

The TimeFormat function has new masks to represent time zones in different formats. For more information, see
Time For mat function description and examples.
Last updated 2/17/2016

DateFormat

The DateFormat function has new masks to represent time zones in different formats. For more information, see
DateFormat function description and examples.

Replace

The Replace function has an updated description and syntax. This function can take either string or callback function as an argument instead of the argument to replace the string. For more information, see
Replace function description.

StructNew

The function has a new parameter, structType, that represents the type of struct to be created.
For more information, see StructNew .

WriteOutput

The function, WriteOutput, has a new parameter, encodefor. encodefor applies encoding on the input string.
For more information, see Wri te O ut pu t .
3

Elements of CFML

The basic elements of CFML, including tags, functions, constants, variables, expressions, and CFScript, make it a powerful tool for developing interactive web applications.
CFML Basics
Comments
Ta gs
Functions
ColdFusion components
Constants
Va ri a bl e s
Expressions
Data types
Flow control
Character case
Special characters
Reserved words in ColdFusion
cfscript tag
Last updated 2/17/2016
Elvis operator
4

Using Arrays and Structures

Adobe ColdFusion supports dynamic multidimensional arrays. Using arrays can enhance your ColdFusion application code. Adobe ColdFusion also supports structures for managing lists of key-value pairs. Because structures can contain ot her str uct ures or compl ex d ata typ es a s it values , th ey p rovid e a fl exi ble and pow erf ul t ool for manag ing compl ex d ata .
About arrays
Basic array techniques
Populating arrays with data
Array functions-Developing guide
About structures
Creating and using structures
Structure examples
Structure functions - Developing guide
Last updated 2/17/2016

Chapter 2: Reserved Words and Variables

Reserved Words and Variables

Adobe ColdFusion language includes reserved words and scope variables.
Reserved words
Scope-specific built-in variables
Custom tag variables
ColdFusion tag-specific variables
CGI environment (CGI Scope) variables
6

Scope-specific built-in variables

ColdFusion returns variables, such as those returned in a cfdirectory or cfftp operation. A variable is usually referenced by scoping it according to its type: naming it according to the code context in which it is available; for example, Session.varname, or Application.varname. For more information on ColdFusion scopes, see Using ColdFusion
Variables in the Developing ColdFusion Applications You use the cflock tag to limit the scope of CFML constructs
that modify shared data structures, files, and CFXs, to ensure that modifications occur sequentially. For more information, see cflock , and Using Persistent Data and Locking in the Developing ColdFusion Applications.

See also

Var iab l e sc o pe
Caller scope
CGI variables
Client variables
Server variables
Application and session variables
Last updated 2/17/2016

Custom tag variables

A ColdFusion custom tag returns the following variables:
Th isTag.Execu tionM ode ThisTag. HasEn dTag Th isTag.GeneratedContent ThisTag.AssocAttribs[index]
A custom tag can set a Caller variable to provide information to the caller. Set the Caller variable as follows:
<cfset Caller.variable_name = "value">
The calling page can access the variable with the cfoutput tag, as follows:
7
<cfoutput>#variable_name#</cfoutput>

See also

Request variable
Form variable

ColdFusion tag-specific variables

Some ColdFusion tags return data as variables. For example, the cffile tag returns file size information in the FileSize variable, referenced as CFFILE.FileSize. The following tags return data that you can reference in variables:
cfcatch cfdirectory cferror cffile cfftp cfhttp cfindex cfldap cfpop cfquery cfregistry cfsearch cfstoredproc

See also

ColdFusion query variables
CFCATCH variables
CFDIRECTORY variables
CFERROR variables
CFFILE ACTION=Upload variables
CFFTP error variables
CFFTP ReturnValue variable
Last updated 2/17/2016
CFFTP query object columns
CFHTTP variables
CFLDAP variables
CFPOP variables
CFQUERY and CFSTOREDPROC variables
CFREGISTRY variables
CFSEARCH variables
8

CGI environment (CGI Scope) variables

When a browser makes a request to a server, the web server and the browser create environment variables. In ColdFusion, these variables are referred to as CGI environment variables. CGI Environment variables contain data about the transaction between the browser and the server, such as the IP Address, browser type, and authenticated username. The available CGI variables depend on the browser and server software. The CGI variables are available to ColdFusion pages in the CGI scope. They take the CGI prefix regardless of whether the server uses a server API or CGI to communicate with the ColdFusion server. You can reference CGI environment variables for a given page request anywhere in the page. CGI variables are read-only. By default, when you use the cfdump tag to display the CGI scope, or when you request debug output of the CGI scope, ColdFusion attempts to display a fixed list of standard CGI environment variables. Because the available variables depend on the server, browser, and the types of interactions between the two, not all variables are normally available. They are represented by empty strings in the debug output. You can request any CGI variable in your application code, including variables that are not in the list variables displayed by dump and debug output. ColdFusion checks for the following variables for the cfdump tag and debug output:
Last updated 2/17/2016
AUTH_PASSWORD AUTH_TYPE AUTH_USER CERT_COOKIE CERT_FLAGS CERT_ISSUER CERT_KEYSIZE CERT_SECRETKEYSIZE CERT_SERIALNUMBER CERT_SERVER_ISSUER CERT_SERVER_SUBJECT CERT_SUBJECT CF_TEMPLATE_PATH CONTENT_LENGTH CONTENT_TYPE CONTEXT_PATH GATEWAY_INTERFACE HTTPS HTTPS_KEYSIZE HTTPS_SECRETKEYSIZE HTTPS_SERVER_ISSUER HTTPS_SERVER_SUBJECT HTTP_ACCEPT HTTP_ACCEPT_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_COOKIE HTTP_HOST HTTP_REFERER HTTP_USER_AGENT QUERY_STRING REMOTE_ADDR REMOTE_HOST REMOTE_USER REQUEST_METHOD SCRIPT_NAME SERVER_NAME SERVER_PORT SERVER_PORT_SECURE SERVER_PROTOCOL SERVER_SOFTWARE WEB_SERVER_API ( This value is always blank; retained for compatibility.)
The following sections describe how to test for CGI environment variables and provide information on some of the more commonly used CGI environment variables
Test i ng f o r C G I v a r ia b les
CGI server variables
CGI client variables
CGI client certificate variables
9
Last updated 2/17/2016

Chapter 3: ColdFusion Tags

ColdFusion Tags

ColdFusion Markup Language (CFML) includes a set of tags that you use in ColdFusion pages to interact with
data sources, manipulate data, and display output. CFML tag syntax is similar to HTML element syntax.
Tags in ColdFusion 10
Tag summary
Tags by function
Tag changes since ColdFusion 5
Tags a-b
10
Tags c
Tags d-e
Tags f
Tags g-h
Tags i
Tags j-l
Tags m-o
Tags p-q
Tags r-s
Tags t
Tags u-z
Last updated 2/17/2016

Tags in ColdFusion 10

The following table briefly describes CFML tags added in ColdFusion 10:
CFML tag Category Description
11
cfexchangeconversation Communications tags Helps users organize and manage
cfexchangefolder Communications tags Allows you to perform various actions on the
cfwebsocket Web Socket tags Lets you create the WebSocket object in your
conversations from a Microsoft Exchange account.
mail folder, such as get folder information, find folders, or create, copy, modify, move, delete, and empty the contents of a folder.
CFM template. The tag creates a reference to the WebSocket JavaScript object at the client­side.

Tag summary

The following table briefly describes CFML tags:
CFML tag Category Description
cfabort Flow-control tags Stops the processing of a ColdFusion page at
cfajaximport Internet protocol tags Controls importation of JavaScript files used
cfajaxproxy Internet protocol tags Generates an AJAX proxy class on the client
the tag location
for ColdFusion AJAX-based features
page for a ColdFusion component
cfapplet Forms tags Embeds Java applets in a cfform tag
cfapplication Application framework tags Defines an application name; activates client
cfargument Extensibility tags Creates a parameter definition within a
variables; specifies client variable storage mechanism
component definition; defines a function argument
Last updated 2/17/2016
12
cfassociate Application framework tags Enables subtag data to be saved with a base
cfbreak Flow-control tags Breaks out of a CFML looping construct
cfcache Page processing tags Caches ColdFusion pages
cfcalendar Forms tags Provides a calendar from which to select a
cfcase Flow-control tags Used with the cfswitch and cfdefaultcase tags
cfcatch Exception handling tags , Flow-control tags Catches exceptions in ColdFusion pages
cfchart Data output tags Generates and displays a chart
cfchartdata Data output tags Defines chart data points
cfchartseries Data output tags Defines style in which chart data displays
cfclient The <cfClient> tag is a marker tag that
cfclientsettings This tag is similar to cfprocessingdirective and
cfcol Data output tags Defines table column header, properties
cfcollection Extensibility tags Administers Solr collections
tag
date
instructs ColdFusion to generate client-side code (JavaScript) for ColdFusion code.
acts as a compiler directive to include plugins for various features (device detection and device API).
cfcomponent Extensibility tags Creates and defines a component object
cfcontent Data output tags , Page processing tags Defines content type and filename of a file to
cfcontinue Flow-control tags Returns processing to the top of a loop; used
cfcookie Variable manipulation tags Defines and sets cookie variables, including
cfdbinfo Database manipulation tags Lets you retrieve information about a data
cfdefaultcase Flow-control tags Receives control if there is no matching cfcase
cfdirectory File management tags Performs typical directory-handling tasks
cfdiv Display management tags Creates an HTML tag with that is populated
cfdocument Data output tags Creates PDF or Adobe FlashPaper output from
cfdocumentitem Data output tags Specifies action items, such as header, footer,
cfdocumentsection Data output tags Divides a PDF or FlashPaper document into
be downloaded by the current page
within a cfloop tag.
expiration and security options
source
tag value
from within a ColdFusion application
using a bind expressions.
a text block that contains CFML and HTML
and page break, for a PDF or FlashPaper document
sections
cfdump Debugging tags , Variable manipulation tags Outputs variables for debugging
Last updated 2/17/2016
cfelse Flow-control tags Creates IF-THEN-ELSE constructs
cfelseif Flow-control tags Creates IF-THEN-ELSE constructs
13
cferror Exception handling tags , Application
framework tags
cfexchangecalendar Communications tags Gets, creates, deletes, modifies, or responds to
cfexchangeconnection Communications tags Opens or closes a persistent connection with
cfexchangecontact Communications tags Gets, creates, deletes, or modifies Exchange
cfexchangeconversation Communications tags Helps users organize and manage
cfexchangefolder Communications tags Allows you to perform various actions on the
cfexchangefilter Communications tags Sets filter conditions used in Exchange tag get
cfexchangemail Communications tags Gets and deletes Exchange mail messages
cfexchangetask Communications tags Gets, creates, deletes, or modifies an
cfexecute Flow-control tags , Extensibility tags Executes developer-specified process on
Displays custom HTML error pages when errors occur
Microsoft Exchange calendar events
an Exchange server
contacts
conversations from a Microsoft Exchange account.
mail folder, such as get folder information, find folders, or create, copy, modify, move, delete, and empty the contents of a folder.
operations
and sets message properties
Exchange user task
server computer
cfexit Flow-control tags Aborts processing of executing CFML tag
cffeed Communications tags , Internet protocol tags Reads, creates, and converts, Atom and RSS
cffile File management tags Performs typical file-handling tasks from
cffileupload File management tags Forms tags Displays a dialog for uploading multiple files
cffinally Exception handling tags Used inside a cftry tag
cfflush Data output tags , Page processing tags Flushes currently available data to client
cfform Forms ta gs Builds input form; performs client-side input
cfformgroup Forms tags Groups form control into a containing object
cfformitem Forms tags Adds text and dividing rules to Adobe Flash
cfftp Forms ta gs , Extensibility tags , Internet
protocol tags
cffunction Extensibility tags Defines function that you build in CFML
cfgrid Forms tags Displays tabular grid control, in cfform tag
cfgridcolumn Forms tags Used in cfform; defines columns in a cfgrid
syndication feeds
within ColdFusion application
from the user's system.
validation
forms
Permits FTP file operations
Last updated 2/17/2016
cfgridrow Forms tags Defines a grid row; used with cfgrid
14
cfgridupdate Forms tags Directly updates ODBC data source from
cfheader Data output tags , Page processing tags Generates HTTP headers
cfhtmlhead Page processing tags Writes text and HTML to HEAD section of page
cfhtmltopdf cfhtmltopdf Data output tags <cfhtmltopdf> creates high quality PDF
cfhtmltopdfitem Data output tags The <cfhtmltopdfitem> specifies the action
cfhttp Internet protocol tags Performs GET and POST to upload file or post
cfhttpparam Internet protocol tags Specifies parameters required for a cfhttp
cfif Flow-control tags Creates IF-THEN-ELSE constructs
cfimage Other tags Creates a cfimage, a ColdFusion data type that
cfimap Communications tags , Internet protocol tags Retrieves and manages e-mails and folders in
cfimapfilter Communication tags Specifies filter parameters that control the
edited grid data
output from a text block containing CFML and HTML using the PDF Service Manager.
items for a PDF document created by the <cfhtmltopdf>tag.
form, cookie, query, or CGI variable directly to server
POST operation; used with cfhttp
can be operated by image functions.
IMAP servers
actions of cfimap, get operations.
cfimport Application framework tags Imports JSP tag libraries into a CFML page
cfinclude Flow-control tags Embeds references to ColdFusion pages
cfindex Extensibility tags Creates Solr search indexes
cfinput Forms tags Creates an input element (radio button, check
cfinsert Database manipulation tags Inserts records in a data source
cfinterface Application framework tags , Extensibility tags Defines an interface that a ColdFusion
cfinvoke Extensibility tags Invokes component methods from a
cfinvokeargument Extensibility tags Passes a parameter to a component method
cflayout Display management tags Creates a region of its container with a specific
cflayoutarea Display management tags Defines a display region within a cflayout tag
cfldap Internet protocol tags Provides access to LDAP directory servers
cflocation Flow-control tags Controls execution of a page
cflock Application framework tags Ensures data integrity and synchronizes
box, text entry box); used in cfform
component can implement
ColdFusion page or component
or a web service
layout behavior
body
execution of CFML code
Last updated 2/17/2016
cflog Data output tags , Other tags Writes a message to a log file
15
cflogin Security tags Defines a container for user login and
cfloginuser Security tags Identifies an authenticated user to ColdFusion
cflogout Security tags Logs the current user out
cfloop Flow-control tags Repeats a set of instructions based on
cfmail Communications tags , Internet protocol tags Assembles and posts an e-mail message
cfmailparam Communications tags , Internet protocol tags Attaches a file or adds a header to an e-mail
cfmailpart Communications tags , Internet protocol tags Contains one part of a multipar t mail message
cfmap Other tags Embeds a Google map within a ColdFusion
cfmapitem Other tags Creates markers on the map; a child tag of the
cfmediaplayer Other tags Creates an in-built media player that can play
cfmenu Display management tags Creates a top-level menu or a tool bar.
cfmenuitem Display management tags Defines an entry in a menu, including an item
cfmessagebox Application framework tags Defines a control for displaying pop-up
authentication code
conditions
message
web page
cfmap tag
FLV files
that is the head of a submenu.
messages
cfNTauthenticate Security tags Authenticates user information against an NT
cfoauth Communications tags , Internet protocol tags The <oauth> tag allows you to easily integrate
cfobject Extensibility tags Creates COM, component, CORBA, Java, and
cfobjectcache Database manipulation tags Flushes the query cache
cfoutput Data output tags Displays the output of a database query or
cfparam Variable manipulation tags Defines a parameter and its default value
cfpdf Forms ta gs Manipulates existing PDF documents.
cfpdfform Forms tags Creates and manipulates PDF forms.
cfpdfformparam Forms tags Creates interactive fields on a PDF form.
cfpdfparam Forms ta gs Child tag of the cfpdf tag. Used only with the
cfpdfsubform Forms tags Creates subforms within a PDF form.
cfpod Display management tags Creates a an area of the browser or layout area
domain
third-party Oauth 2 authentication provider
web service objects
other operation
merge action to merge multiple pages or PDF documents into one file
with an optional title bar and a body
Last updated 2/17/2016
16
cfpop Communications tags , Internet protocol tags Gets and deletes messages from POP mail
cfpresentation Data output tags Creates a presentation dynamically from an
cfpresentationslide Data output tags Creates a slide dynamically from an HTML
cfpresenter Data output tags Describes a presenter in a slide presentation
cfprint Data output tags Prints PDF documents. Used for automated
cfprocessingdirective Data output tags Suppresses white space and other output
cfprocparam Database manipulation tags Holds parameter information for stored
cfprocresult Database manipulation tags Result set name that ColdFusion tags use to
cfprogressbar Other tags Defines a progress bar to indicate the progress
cfproperty Extensibility tags Defines components
cfquery Database manipulation tags Passes SQL statements to a database
cfqueryparam Database manipulation tags Checks data type of a query parameter
cfregistry Other tags , Variable manipulation tags Reads, writes, and deletes keys and values in a
server
HTML page or SWF files
page or SWF source files (child tag of the cfpresentation tag)
print jobs
procedure
access result set of a stored procedure
of an activity
Windows system registry
cfreport Exception handling tags Embeds a ColdFusion Report Builder or
cfreportparam Exception handling tags Passes an input parameter to a ColdFusion
cfrethrow Exception handling tags Rethrows currently active exception
cfreturn Extensibility tags Returns results from a component method
cfsavecontent Variable manipulation tags Saves generated content inside tag body in a
cfschedule Variable manipulation tags Schedules page execution; optionally,
cfscript Application framework tags Encloses a set of cfscript statements
cfsearch Extensibility tags Executes searches against data indexed in Solr
cfselect Forms tags Creates a drop-down list box form element;
cfset Variable manipulation tags Defines a variable
cfsetting Other tags , Variable manipulation tags Defines and controls ColdFusion settings
cfsharepoint Extensibility tags Invokes a SharePoint action from ColdFusion
cfsilent Data output tags , Page processing tags Suppresses CFML output within tag scope
cfslider Forms tags Creates slider control; used in cfform
Crystal Reports report
Report Builder report
variable
produces static pages
collections, using cfindex
used in cfform tag
Last updated 2/17/2016
cfspreadsheet Extensibility tags Manages Excel spreadsheet files
cfsprydataset Internet protocol tags Creates a spry data set
17
cfstoredproc Database manipulation tags Holds database connection information;
cfswitch Flow-control tags Evaluates passed expre ssion; passes control to
cftable Data output tags Builds a table in a ColdFusion page
cftextarea Forms tags Puts a multiline text box in a form
cfthread Application framework tags Creates and manages ColdFusion threads,
cfthrow Exception handling tags , Flow-control tags Throws a developer-specified exception
cftimer Debugging tags Displays execution time for a block of code
cftooltip Display management tags Specifies text to display when the mouse
cftrace Debugging tags Displays and logs application debugging data
cftransaction Database manipulation tags Groups cfquery operations into one
cftree Forms tags Creates tree control element; used in cfform
cftreeitem Forms tags Populates a tree control element in a form;
cftry Exception handling tags , Flow-control tags Catches exceptions in ColdFusion pages
cfupdate Database manipulation tags Updates rows in a database data source
identifies a stored procedure to execute
matching cfcase tag
independent streams of execution.
pointer hovers over the tag body elements
transaction; performs rollback processing
used with cftree
cfwebsocket Web Socket tags Lets you create the WebSocket object in your
cfwddx Extensibility tags Serializes and deserializes CFML data
cfwindow Display management tags Creates a pop-up window in the browser
cfxml Extensibility tags Creates an XML document object
cfzip File management tags Manipulates ZIP and JAR files
cfzipparam File management tags Manipulates ZIP and JAR files
CFM template. The tag creates a reference to the WebSocket JavaScript object at the client­side.
structures to XML-based WDDX format

Tags by function

This section lists tags by their function or purpose.
Application framework tags
Communications tags
Database manipulation tags
Data output tags
Last updated 2/17/2016
Debugging tags
Display management tags
Exception handling tags
Extensibility tags
File management tags
Flow-control tags
Forms tags
Internet protocol tags
Page processing tags
Security tags
Variable manipulation tags
Web S oc k et t ag s
Other tags
18
Last updated 2/17/2016

Tag changes since ColdFusion 5

The following section lists tags, attributes, and values that have changed since ColdFusion 5, and indicate the specific release in which the change was made.
New tags, attributes, and values
Deprecated tags, attributes, and values
Obsolete tags, attributes, and values

Tags a-b

This section lists tags starting with alphabets A-B with their description.
19
cfabort
cfajaximport
cfajaxproxy
cfapplet
cfapplication
cfargument
cfassociate
cfauthenticate
cfbreak
Last updated 2/17/2016

Tags r-s

This section lists tags starting with alphabets R-S with their description.
cfregistry
cfreport
cfreportparam
cfrethrow
cfreturn
cfsavecontent
cfschedule
cfscript
cfsearch
cfselect
cfservlet
20
cfservletparam
cfset
cfsetting
cfsharepoint
cfsilent
cfslider
cfspreadsheet
cfsprydataset
cfstoredproc
cfswitch
Last updated 2/17/2016

Tags t

21
This section lists tags starting with alphabet T with their description.
cftable
cftextarea
cftextinput
cfthread
cfthrow
cftimer
cftooltip
cftrace
cftransaction
cftree
cftreeitem
cftry
Last updated 2/17/2016

Tags u-z

This section lists tags starting with alphabets U-Z with their description.
cfupdate
cfwddx
cfwebsocket
cfwindow
cfxml
22
cfzip
cfzipparam

Tags m-o

This section lists tags starting with alphabets M-O with their description.
cfmail
cfmailparam
cfmailpart
cfmap
cfmapitem
cfmediaplayer
cfmenu
Last updated 2/17/2016
cfmenuitem
cfmessagebox
cfmodule
cfNTauthenticate
cfoauth
cfobject
cfobject: .NET object
cfobject: COM object
cfobject: component object
cfobject: CORBA object
cfobject: Java or EJB object
cfobject: web service object
cfobjectcache
cfoutput
23
Last updated 2/17/2016

Tags g-h

This section lists tags starting with alphabets G-H with their description.
cfgraph
cfgraphdata
cfgrid
cfgridcolumn
cfgridrow
cfgridupdate
cfheader
cfhtmlhead
cfhtmltopdf
24
cfhtmltopdfitem
cfhttp
cfhttpparam

Tags f

This section lists tags starting with alphabet F with their description.
cffeed
Last updated 2/17/2016
cffile
cffile action = "append"
cffile action = "copy"
cffile action = "delete"
cffile action = "move"
cffile action = "read"
cffile action = "readBinary"
cffile action = "rename"
cffile action = "upload"
cffile action = "uploadAll"
cffile action = "write"
cffileupload
cffinally
cfflush
25
cfformgroup
cfformitem
cfftp
cfftp: Opening and closing FTP server connections
cfftp: Opening and closing secure FTP server connections
cfftp: Connection: file and directory operations
cfftp action = "listDir"
cfform
cffunction
Last updated 2/17/2016
26

Tags d-e

This section lists tags starting with alphabets D-E with their description.
cfdbinfo
cfdefaultcase
cfdirectory
cfdiv
cfdocument
cfdocumentitem
cfdocumentsection
cfdump
cfelse
cfelseif
cferror
cfexchangecalendar
cfexchangeconnection
cfexchangecontact
cfexchangeconversation
cfexchangefilter
cfexchangefolder
Last updated 2/17/2016
cfexchangemail
cfexchangetask
cfexecute
cfexit
27

Tags p-q

This section lists tags starting with alphabets P-Q with their description.
cfparam
cfpdf
cfpdfform
cfpdfformparam
cfpdfparam
Last updated 2/17/2016
cfpdfsubform
cfpod
cfpop
cfpresentation
cfpresentationslide
cfpresenter
cfprint
cfprocessingdirective
cfprocparam
cfprocresult
cfprogressbar
cfproperty
cfquery
cfqueryparam
28
Last updated 2/17/2016

Tags j-l

This section lists tags starting with alphabets J-L with their description.
cflayout
cflayoutarea
cfldap
cflocation
cflock
cflog
cflogin
cfloginuser
cflogout
cfloop
cfloop: index loop
29
cfloop: conditional loop
cfloop: looping over a date or time range
cfloop: looping over a query
cfloop: looping over a list, a file, or an array
cfloop: looping over a COM collection or structure
Last updated 2/17/2016

Tags i

This section lists tags starting with alphabet I with their description.
cfif
cfimage
cfimap
cfimapfilter
cfimpersonate
cfimport
cfinclude
cfindex
cfinput
30
cfinsert
cfinterface
cfinvoke
cfinvokeargument
Last updated 2/17/2016

Tags c

This section lists tags starting with alphabet C with their description.
cfcache
cfcalendar
cfcase
cfcatch
cfchart
cfchartdata
cfchartseries
cfcol
cfcollection
cfcomponent
cfcontent
31
cfcontinue
cfcookie
cfclient
cfclientsettings
Last updated 2/17/2016
32
Chapter 4: Co
ldFusion Functions

ColdFusion Functions

The following list shows the ColdFusion Markup Language (CFML) functions. New Functions in
ColdFusion 10
Functions by category
Function changes since ColdFusion 5
Functions a-b
Functions c-d
Functions e-g
Functions h-im
Functions in-k
Functions l
Functions m-r
Functions s
Functions t-z
Last updated 2/17/2016

New Functions in ColdFusion 10

ArraySlice ArrayEach ArrayFilter ArrayFindAll ArrayFindAllNoCase ImageMakeTranslucent Invoke IsClosure ListFilter LSDateTimeFormat
33
CacheIdExists CacheRegionNew CacheRegionRemove CacheRemoveAll Canonicalize CacheRegionExists
CallStackDump CallStackGet CSRFGenerateToken CSRFVerifyToken DateTimeFormat DecodeForHTML
DecodeFromURL DirectoryCopy EncodeForHTML EncodeForCSS EncodeForHTMLAttribute EncodeForJavaScript
EncodeForURL EncodeForXML FileGet MimeType GetApplicationMetadata GetCPUUsage
GetTotalSpaceGetFreeSpace GetSystemFreeMemoryGetTotalSpace GetSystemFreeMemory GetSystemTotalMemory HMac ImageCreateCaptcha ImageMakeColorTransparent
ListRemoveDuplicates OnWSAuthenticate ORMIndex ORMIndexPurge ORMSearch ORMSearchOffline
ReEscape RestInitApplication RemoveCachedQuery RestDeleteApplication RestSetResponse SessionRotate
SessionGetMetaData SessionInvalidate StructEach StructFilter WSGetAllChannels WSGetSubscribers
WSPublish WSSendMessage

Functions by category

The following section list functions by their category or purpose.
Array functions
Cache functions
Conversion functions
Date and time functions
Data output functions
Debugging functions
Decision functions
Display and formatting functions
Dynamic evaluation functions
Exception handling functions
Extensibility functions
Flow control functions
Full-text search functions
Image functions
International functions
List functions
Mathematical functions
Microsoft Office integration functions
ORM functions
Last updated 2/17/2016
Other functions
Query functions
Security functions
Spreadsheet functions
String functions
Structure functions
System functions
Tran s action funct i o ns
XML functions
Mobile Functions
34
Last updated 2/17/2016

Function changes since ColdFusion 5

The tables in the sub-section lists functions, parameters and values that have changed since ColdFusion 5 and indicate the specific release in which the change was made.
New functions, parameters, and values
Deprecated functions, parameters, and values
Obsolete functions, parameters, and values
35

Functions a-b

Abs
ACos
AddSOAPRequestHeader
AddSOAPResponseHeader
AjaxLink
AjaxOnLoad
ApplicationStop
ArrayAppend
ArrayAvg
ArrayClear
ArrayContains
ArrayDelete
ArrayDeleteAt
ArrayDeleteNoCase
ArrayEach
Last updated 2/17/2016
ArrayFilter
ArrayFind
ArrayFindAll
ArrayFindAllNoCase
ArrayFindNoCase
ArrayInsertAt
ArrayIsDefined
ArrayIsEmpty
arrayLen
ArrayMap
ArrayMax
ArrayMin
ArrayNew
ArrayPrepend
36
ArrayReduce
ArrayResize
ArraySet
ArraySlice
ArraySort
ArraySum
ArraySwap
ArrayToList
Asc
ASin
Atn
AuthenticatedContext
AuthenticatedUser
BinaryDecode
BinaryEncode
BitAnd
BitMaskClear
BitMaskRead
BitMaskSet
BitNot
Last updated 2/17/2016
BitOr
BitSHLN
BitSHRN
BitXor
37
Last updated 2/17/2016
38

Functions c-d

CacheIdExists
CacheGet
CacheGetAllIds
CacheGetMetadata
Last updated 2/17/2016
cacheGetSession
CachePut
CacheRegionExists
CacheRegionNew
CacheRegionRemove
CacheRemove
CacheRemoveAll
CacheSetProperties
CallStackGet
CallStackDump
CacheGetProperties
CanDeSerialize
Canonicalize
CanSerialize
39
Ceiling
CharsetDecode
CharsetEncode
Chr
CJustify
Compare
CompareNoCase
Cos
CreateDate
CreateDateTime
CreateObject
CreateObject: .NET object
CreateObject: COM object
CreateObject: component object
CreateObject: CORBA object
CreateObject: Java or EJB object
CreateObject: web service object
CreateODBCDate
CreateODBCDateTime
CreateODBCTime
Last updated 2/17/2016
CreateTime
CreateTimeSpan
CreateUUID
CSRFGenerateToken
CSRFVerifyToken
DateAdd
DateCompare
DateConvert
DateDiff
DateFormat
DateTimeFormat
DatePart
Day
DayOfWeek
40
DayOfWeekAsString
DayOfYear
DaysInMonth
DaysInYear
DE
DecimalFormat
DecodeForHTML
DecodeFromURL
DecrementValue
Decrypt
DecryptBinary
DeleteClientVariable
DeserializeJSON
DirectoryCopy
DirectoryCreate
DirectoryDelete
DirectoryExists
DirectoryList
DirectoryRename
DollarFormat
Last updated 2/17/2016
DotNetToCFType
Duplicate
Deserialize
DeserializeXML
41
Last updated 2/17/2016
43

Functions h-im

Hash
HMac
HQLMethods
Hour
HTMLCodeFormat
HTMLEditFormat
IIf
ImageAddBorder
ImageBlur
ImageClearRect
ImageCopy
ImageCreateCaptcha
ImageCrop
ImageDrawArc
ImageDrawBeveledRect
ImageDrawCubicCurve
ImageDrawLine
ImageDrawLines
Last updated 2/17/2016
ImageDrawOval
ImageDrawPoint
ImageDrawQuadraticCurve
ImageDrawRect
ImageDrawRoundRect
ImageDrawText
ImageFlip
ImageGetBlob
ImageGetBufferedImage
ImageGetEXIFMetadata
ImageGetEXIFTag
ImageGetHeight
ImageGetMetadata
ImageGetIPTCMetadata
44
ImageGetIPTCTag
ImageGetWidth
ImageGrayscale
ImageInfo
ImageMakeColorTransparent
ImageMakeTranslucent
ImageNegative
ImageNew
ImageOverlay
ImagePaste
ImageRead
ImageReadBase64
ImageResize
ImageRotate
ImageRotateDrawingAxis
ImageScaleToFit
ImageSetAntialiasing
ImageSetBackgroundColor
ImageSetDrawingColor
ImageSetDrawingStroke
Last updated 2/17/2016
ImageSetDrawingTransparency
ImageSharpen
ImageShear
ImageShearDrawingAxis
ImageTranslate
ImageTranslateDrawingAxis
ImageWrite
ImageWriteBase64
ImageXORDrawingMode
45
Last updated 2/17/2016

Functions m-r

Max
Mid
Min
Minute
Month
MonthAsString
Now
NumberFormat
ObjectEquals
47
ObjectLoad
ObjectSave
OnWSAuthenticate
ORMClearSession
ORMCloseAllSessions
ORMCloseSession
ORMEvictCollection
ORMEvictEntity
ORMEvictQueries
ORMExecuteQuery
ORMFlush
ORMFlushall
ORMGetSession
ORMGetSessionFactory
ORMIndex
ORMIndexPurge
ORMReload
ORMSearch
ORMSearchOffline
ParagraphFormat
Last updated 2/17/2016
ParameterExists
ParseDateTime
Pi
PrecisionEvaluate
Quarter
PreserveSingleQuotes
QueryAddColumn
QueryAddRow
QueryExecute
QueryGetRow
QueryNew
QueryConvertForGrid
QuerySetCell
QuotedValueList
48
Rand
Randomize
RandRange
ReEscape
REFind
REFindNoCase
REMatch
REMatchNoCase
ReleaseComObject
RemoveCachedQuery
RemoveChars
RepeatString
Replace
ReplaceList
ReplaceNoCase
REReplace
REReplaceNoCase
RestDeleteApplication
RestSetResponse
RestInitApplication
Last updated 2/17/2016
Reverse
Right
RJustify
Round
RTrim
49
Last updated 2/17/2016
51

Functions in-k

IncrementValue
InputBaseN
Insert
Int
InvalidateOauthAccesstoken
Invoke
InvokeCFClientFunction
IsArray
IsAuthenticated
IsAuthorized
IsBinary
IsBoolean
IsClosure
IsCustomFunction
IsDate
IsDDX
IsDebugMode
IsDefined
IsImage
Last updated 2/17/2016
IsImageFile
IsInstanceOf
IsIPv6
IsJSON
IsK2ServerABroker
IsK2ServerDocCountExceeded
IsK2ServerOnline
IsLeapYear
IsLocalHost
IsNull
IsNumeric
IsNumericDate
IsObject
isOnline
52
IsPDFFile
IsPDFObject
IsProtected
IsQuery
isSafeHTML
IsSimpleValue
IsSOAPRequest
IsSpreadsheetFile
IsSpreadsheetObject
IsStruct
IsUserInAnyRole
IsUserInRole
IsUserLoggedIn
IsValid
IsValidOauthAccesstoken
IsWDDX
IsXML
IsXmlAttribute
IsXmlDoc
IsXmlElem
Last updated 2/17/2016
IsXmlNode
IsXmlRoot
JavaCast
JSStringFormat
53
Last updated 2/17/2016
54

Functions l

LCase
Left
Last updated 2/17/2016
Len
ListAppend
ListChangeDelims
ListContains
ListContainsNoCase
ListDeleteAt
ListEach
ListFilter
ListFind
ListFindNoCase
ListFirst
ListGetAt
ListInsertAt
ListLast
55
ListLen
ListMap
ListPrepend
ListQualify
ListReduce
ListRemoveDuplicates
ListRest
ListSetAt
ListSort
ListToArray
ListValueCount
ListValueCountNoCase
LJustify
Location
Log
Log10
LSCurrencyFormat
LSDateFormat
LSDateTimeFormat
LSEuroCurrencyFormat
Last updated 2/17/2016
LSIsCurrency
LSIsDate
LSIsNumeric
LSNumberFormat
LSParseCurrency
LSParseDateTime
LSParseEuroCurrency
LSParseNumber
LSTimeFormat
LTri m
56
Last updated 2/17/2016
57

Functions t-z

Ta n
ThreadJoin
ThreadTerminate
Throw
Time For mat
To B as e 6 4
To Bi n a r y
Last updated 2/17/2016
To S cr i p t
To St r i ng
Tra ce
Transactionandconcurrency
Tran s ac ti on Co mm it
Tran s ac ti on Ro ll ba ck
TransactionSetSavePoint
Tr im
UCase
URLDecode
URLEncodedFormat
URLSessionFormat
Va l
Va lu e L is t
58
Ve ri f y C li e nt
We ek
Wr ap
Wr it eD u mp
Wr it eL o g
Wr it eO ut p ut
WSGetAllChannels
WSGetSubscribers
WSPublish
WSSendMessage
XmlChildPos
XmlElemNew
XmlFormat
XmlGetNodeType
XmlNew
XmlParse
XmlSearch
XmlTransform
XmlValidate
Ye a r
Last updated 2/17/2016
Ye s N o F o r m a t
59
Last updated 2/17/2016

Functions s

Second
60
SendGatewayMessage
SerializeJSON
SessionInvalidate
SessionRotate
SessionGetMetaData
SetEncoding
SetLocale
SetProfileString
SetVariable
Sgn
Sin
Sleep
SpanExcluding
SpanIncluding
SpreadsheetAddColumn
SpreadsheetAddImage
SpreadsheetAddFreezePane
SpreadsheetAddInfo
SpreadsheetAddRow
SpreadsheetAddRows
Last updated 2/17/2016
SpreadsheetAddSplitPane
SpreadsheetCreateSheet
SpreadsheetDeleteColumn
SpreadsheetDeleteColumns
SpreadsheetDeleteRow
SpreadsheetDeleteRows
SpreadsheetFormatCell
SpreadsheetFormatColumn
SpreadsheetFormatCellRange
SpreadsheetFormatColumns
SpreadsheetFormatRow
SpreadsheetFormatRows
SpreadsheetGetCellComment
SpreadsheetGetCellFormula
61
SpreadsheetGetCellValue
SpreadsheetInfo
SpreadsheetMergeCells
SpreadsheetNew
SpreadsheetRead
SpreadsheetReadBinary
SpreadsheetRemoveSheet
SpreadsheetSetActiveSheet
SpreadsheetSetActiveSheetNumber
SpreadsheetSetCellComment
SpreadsheetSetCellFormula
SpreadsheetSetCellValue
SpreadsheetSetColumnWidth
SpreadsheetSetFooter
SpreadsheetSetHeader
SpreadsheetSetRowHeight
SpreadsheetShiftColumns
SpreadsheetShiftRows
SpreadsheetWrite
Sqr
Last updated 2/17/2016
StripCR
StructAppend
StructClear
StructCopy
StructCount
StructDelete
StructEach
StructFilter
StructFind
StructFindKey
StructFindValue
StructGet
StructInsert
StructIsEmpty
62
StructKeyArray
StructKeyExists
StructKeyList
StructNew
StructSort
StructUpdate
SpreadSheetAddPagebreaks
SpreadSheetAddAutofilter
StructReduce
StructMap
Serialize
SerializeXML
Last updated 2/17/2016

Functions e-g

EncodeForCSS
EncodeForHTML
EncodeForHTMLAttribute
EncodeForXMLAttribute
EncodeForJavaScript
65
EncodeForURL
EncodeForXML
EncodeForXpath
Encrypt
GetTempDirectory
GetApplicationMetadata
EncryptBinary
EntityDelete
EntityLoad
EntityLoadByExample
EntityLoadByPK
EntityMerge
EntityNew
EntityReload
EntitySave
EntityToQuery
Evaluate
Exp
ExpandPath
FileClose
Last updated 2/17/2016
FileCopy
FileDelete
FileExists
FileGetMimeType
FileIsEOF
FileMove
FileOpen
FileRead
FileReadBinary
FileReadLine
FileSeek
FileSetAccessMode
FileSetAttribute
FileSetLastModified
66
FileSkipBytes
FileUpload
FileUploadAll
FileWrite
FileWriteLine
Find
FindNoCase
FindOneOf
FirstDayOfMonth
Fix
FormatBaseN
GenerateSecretKey
GetAuthUser
GetBaseTagData
GetBaseTagList
GetBaseTemplatePath
GetClientVariablesList
GetComponentMetaData
GetContextRoot
GetCPUUsage
Last updated 2/17/2016
GetCurrentTemplatePath
GetDirectoryFromPath
GetEncoding
GetException
GetFileFromPath
GetFileInfo
GetFreeSpace
GetFunctionCalledName
GetFunctionList
GetGatewayHelper
GetHttpRequestData
GetHttpTimeString
GetK2ServerDocCount
GetK2ServerDocCountLimit
67
GetLocale
GetLocaleDisplayName
GetLocalHostIP
GetMetaData
GetMetricData
GeneratePBKDFKey
GetPageContext
GetPrinterInfo
GetPrinterList
GetProfileSections
GetProfileString
GetReadableImageFormats
GetSafeHTML
GetSOAPRequest
GetSOAPRequestHeader
GetSOAPResponse
GetSOAPResponseHeader
GetSystemFreeMemory
GetSystemTotalMemory
GetTempFile
Last updated 2/17/2016
GetTemplatePath
GetTickCount
GetTimeZoneInfo
GetToken
GetTotalSpace
GetUserRoles
GetVFSMetaData
GetWriteableImageFormats
68
Last updated 2/17/2016

Chapter 5: Ajax JavaScript Functions

Ajax JavaScript Functions

You can use the JavaScript functions listed below on pages that use ColdFusion Ajax features.
Function summary Ajax
ColdFusion.Ajax.submitForm
ColdFusion.Autosuggest.getAutosuggestObject
ColdFusion.Layout.enableSourceBind
ColdFusion.MessageBox.getMessageBoxObject
ColdFusion.MessageBox.isMessageBoxDefined
72
ColdFusion.ProgressBar.getProgressBarObject

Function summary Ajax

The following table briefly describes the JavaScript functions that you can use in ColdFusion pages that use Ajax features:
Function Description
ColdFusion.Ajax.submitForm Submits form data without refreshing the entire page when the results
are returned.
ColdFusion.Autosuggest.getAutosuggestObject Lets you access underlying YUI AutoComplete object thereby
ColdFusion.FileUpload.cancelUpload Cancels the file upload at any point during the file upload.
ColdFusion.FileUpload.clearAllFiles Clears all the files selected for upload.
Last updated 2/17/2016
providing fine-grained control over the object, for example attaching an event.
Coldfusion.fileUpload.setUrl Sets URL for the fileupload control dynamically.
ColdFusion.FileUpload.startUpload Starts uploading the selected files.
ColdFusion.getElementValue Gets the value of an attribute of a bindable ColdFusion control.
ColdFusion.grid.clearSelectedRows Clears the selected rows in the grid.
73
ColdFusion.Grid.getBottomToolbar Gets bottom toolbar that can be used to add a control, for example
ColdFusion.Grid.getGridObject Gets the underlying Ext JS - JavaScript Library object for the specified
ColdFusion.grid.getSelectedRows Fetches data for the selected rows in the grid.
ColdFusion.Grid.getTopToolbar Gets the top toolbar that can be used to add a control, for example
ColdFusion.Grid.hideBottomToolbar Hides the bottom toolbar that can be used to add a control, for
ColdFusion.Grid.hideTopToolbar Hides the top toolbar that can be used to add a control, for example
ColdFusion.Grid.refresh Manually refreshes a displayed grid.
ColdFusion.Grid.refreshBottomToolbar Refreshes the bottom toolbar that can be used to add a control, for
ColdFusion.Grid.refreshTopToolbar Refreshes the top toolbar that can be used to add a control, for
ColdFusion.Grid.showBottomToolbar Shows bottom toolbar that can be used to add a control, for example
ColdFusion.Grid.showTopToolbar Displays the top toolbar that can be used to add a control, for example
ColdFusion.Grid.sort Sorts the specified HTML grid.
icon or button.
HTML cfgrid control.
icon or button.
example icon or button.
icon or button.
example icon or button.
example icon or button.
icon or button.
icon or button.
ColdFusion.JSON.decode Converts a JSON-encoded string into a JavaScript variable
ColdFusion.JSON.encode converts a JavaScript variable into a JSON string.
ColdFusion.Layout.collapseAccordion Collapses an area of an accordion layout.
ColdFusion.Layout.collapseArea Collapses an area of a border layout (cflayout tag with a type attribute
ColdFusion.Layout.createAccordionPanel Creates a panel in an existing accordion layout (cflayout tag with a
ColdFusion.Layout.createTab Creates a tab in an existing tabbed layout (cflayout tag with a type
ColdFusion.Layout.disableSourceBind Disables the source bind.
ColdFusion.Layout.disableTab Disables the specified tab so it cannot be selected.
ColdFusion.Layout.enableSourceBind If disabled, enables the source bind.
ColdFusion.Layout.enableTab Enables the specified tab so users can select it and display the area
ColdFusion.Layout.expandAccordion Expands a collapsed area of an accordion layout.
ColdFusion.Layout.expandArea Expands a collapsed area of a border layout.
of border).
type attribute of accordion).
attribute of tab).
contents.
Last updated 2/17/2016
74
ColdFusion.Layout.getAccordionLayout Gets the underlying Ext JS - JavaScript Library object for the specified
ColdFusion.Layout.getBorderLayout Gets the underlying Ext JS - JavaScript Library object for the specified
ColdFusion.Layout.getTabLayout Gets the underlying Ext JS - JavaScript Library object for the specified
ColdFusion.Layout.hideAccordion Hides an accordion.
ColdFusion.Layout.hideArea Hides a bordered layout area.
ColdFusion.Layout.hideTab Hides a tab.
ColdFusion.Layout.selectAccordion Selects an accordion and displays the layout area contents.
ColdFusion.Layout.selectTab Selects a tab and displays the layout area contents.
ColdFusion.Layout.showAccordion Shows an accordion that was hidden using the inithide attribute or the
ColdFusion.Layout.showArea Shows an area of a border layout that was hidden using the inithide
ColdFusion.Layout.showTab Shows a tab that was hidden using the inithide attribute or the
ColdFusion.Log.debug Displays a debug-level message in the log window.
ColdFusion.Log.dump Displays information about a complex variable in the log window.
ColdFusion.Log.error Displays an error-level message in the log window.
accordion type cflayout control.
border type cflayout control.
tab type cflayout control.
hideArea() function.
attribute or the hideArea() function.
hideTab() function.
ColdFusion.Log.info Displays an information-level message in the log window.
ColdFusion.Map.addEvent Enables event handling in a map.
ColdFusion.Map.addMarker Adds a marker to the map.
ColdFusion.Map.getLatitudeLongitude Gets the latitude/longitude coordinates for a given address.
ColdFusion.Map.getMapObject Gets the Google map component.
ColdFusion.Map.hide Hides the map if displayed.
ColdFusion.Map.refresh Reloads the map.
ColdFusion.Map.setCenter Sets the center of map to the address that you specify.
ColdFusion.Map.setZoomlevel Sets the zoom level of the map to the new value.
ColdFusion.Map.show Shows the map if it is hidden.
ColdFusion.Mediaplayer.resize Changes the current size of the media player.
ColdFusion.Mediaplayer.setMute Mutes or unmutes the sound of the media player.
ColdFusion.Mediaplayer.setSource Sets the URL of the FLV file.
ColdFusion.Mediaplayer.setVolume Sets the volume of sound of the media player.
ColdFusion.Mediaplayer.startPlay Plays the FLV file.
ColdFusion.Mediaplayer.stopPlay Stops playing the FLV file.
ColdFusion.MessageBox.create Creates a ColdFusion message box. Equivalent to the cfmessagebox
tag.
Last updated 2/17/2016
75
ColdFusion.MessageBox.getMessageBoxObject Gets the underlying Ext JS - JavaScript Library object for the specified
ColdFusion.MessageBox.isMessageBoxDefined Checks if a message box is defined.
ColdFusion.MessageBox.show Displays a ColdFusion message box.
ColdFusion.MessageBox.update Updates message box properties.
ColdFusion.MessageBox.updateMessage Updates the message property.
ColdFusion.MessageBox.updateTitle Updates the message box title.
ColdFusion.navigate Displays the output of a link URL in a specified cfdiv, cflayoutarea,
ColdFusion.ProgressBar.getProgressBarObject Gets the progress bar object.
ColdFusion.ProgressBar.hide Hides the progress bar if it is displayed.
ColdFusion.ProgressBar.reset Resets the progress.
ColdFusion.ProgressBar.show Shows the progress bar if it is hidden.
ColdFusion.ProgressBar.start Stops the underlying progress bar object that is running.
ColdFusion.ProgressBar.stop Starts the underlying progress bar object.
ColdFusion.ProgressBar.update Updates the attributes duration, interval, and oncomplete.
ColdFusion.ProgressBar.updatestatus Lets you manually update the status and message of the progress bar.
ColdFusion.setGlobalErrorHandler Replaces the global JavaScript error handler for displaying information
HTML cfmessagebox control.
cfpod, or cfwindow container.
about ColdFusion Ajax errors.
ColdFusion.Slider.disable Disables the slider control.
ColdFusion.Slider.enable Enables the slider control.
ColdFusion.Slider.getSliderObject Gets the slider control.
ColdFusion.Slider.getValue Gets the numeric value of the slider control.
ColdFusion.Slider.hide Hides the slider control.
ColdFusion.Slider.setValue Sets the numeric value of the slider control.
ColdFusion.Slider.show Shows the slider control.
ColdFusion.Tree.getTreeObject Gets the underlying Yahoo YUI Library object for the specified HTML
ColdFusion.Tree.refresh Manually refreshes a displayed HTML tree.
ColdFusion.Window.create Creates a ColdFusion pop-up window. Equivalent to the cfwindow tag.
ColdFusion.Window.getWindowObject Gets the underlying Ext JS - JavaScript Library object for the specified
ColdFusion.Window.hide Hides a window
ColdFusion.Window.onHide Specifies a JavaScript function to run each time a specific window
ColdFusion.Window.onShow Specifies a JavaScript function to run each time a specific window
ColdFusion.Window.show Shows a hidden window.
cftree control.
HTML cfwindow control.
hides.
shows.
Last updated 2/17/2016

ColdFusion.Ajax.submitForm

Description
Submits form data without refreshing the page when the results are returned.
Function syntax
ColdFusion.Ajax.submitForm(formId, URL[, callbackhandler, errorHandler, httpMethod, asynch])
See also
cfajaxproxy , ColdFusion.navigate , Using the ColdFusion.Ajax.submitForm function in Using Ajax form controls and features in the Developing ColdFusion Applications
History
ColdFusion 8: Added this function.
Parameters
Parameter Description
76
formId The ID or name attribute of the form.
URL The URL to which to submit the form.
callbackhandler The JavaScript function to handle a normal response. The function
errorHandler The JavaScript function to handle an HTTP error response. The
httpMethod The HTTP method to use for the submission, must be one of the
must take a single argument, that contains the response body. This method is used only if the form submission is asynchronous.
function must take two arguments: the HTTP status code, and the error message. This method is used only if the form submission is asynchronous.
following:
GET
POST (the default)
asynch A Boolean value specifying whether to submit the form
asynchronously. The default value is true.
Returns
If the asynch argument is false, returns the response body. Otherwise, the function does not return a value.
Usa ge
If the page that calls this function does not have any ColdFusion AJAX-based controls, use a cfajaximport tag on the page to ensure that the page includes the JavaScript definition for this function.
Note: This function does not submit the contents of file fields.
Example
See Using the ColdFusion.Ajax.submitForm function in Using Ajax form controls and features in the Developing ColdFusion Applications.
Last updated 2/17/2016

ColdFusion.Autosuggest.getAutosuggestObject

Description
Lets you access underlying YUI AutoComplete object thereby providing fine-grained control over the object, for example attaching an event.
Returns
The underlying AutoComplete object.
Function syntax
ColdFusion.Autosuggest.getAutosuggestObject (Id)
Parameters
Id: Name of the auto-suggest object.
Example
<html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <cfajaximport tags="cfinput-autosuggest"> <script> var init = function() { autosuggestobj = ColdFusion.Autosuggest.getAutosuggestObject('state'); autosuggestobj.itemSelectEvent.subscribe(foo); } var foo = function(event,args) { var msg = ""; msg = msg + "Event: " + event + "\n\n"; msg = msg + "Selected Item: " + args[2] + "\n\n"; msg = msg + "Index: " + args[1]._nItemIndex + "\n\n"; alert(msg); } var getStates = function(){ return ["California","Connecticut","Colorado","Illinois","Alabama","Iowa","Utah", "Alaska"]; } </script> </head> <body> <h3>Attaching an event handler to the autosuggest object</h3> <cfform name="mycfform" method="post" > State:<BR> <cfinput type="text" name="state" autosuggest="javascript:getStates({cfautosuggestvalue})" autosuggestMinLength=1 autosuggestBindDelay=1> <cfset ajaxOnLoad("init")> </cfform> </body> </html>
77

See also

ColdFusion.Chart.getChartHandle
ColdFusion.FileUpload.cancelUpload
ColdFusion.FileUpload.clearAllFiles
Coldfusion.fileUpload.setUrl
ColdFusion.FileUpload.startUpload
ColdFusion.getElementValue
ColdFusion.grid.clearSelectedRows
ColdFusion.Grid.getBottomToolbar
ColdFusion.Grid.getGridObject
ColdFusion.grid.getSelectedRows
ColdFusion.Grid.getTopToolbar
ColdFusion.Grid.hideBottomToolbar
ColdFusion.Grid.hideTopToolbar
ColdFusion.Grid.refresh
ColdFusion.Grid.refreshBottomToolbar
ColdFusion.Grid.refreshTopToolbar
Last updated 2/17/2016
ColdFusion.Grid.showBottomToolbar
ColdFusion.Grid.showTopToolbar
ColdFusion.Grid.sort
ColdFusion.JSON.decode
ColdFusion.JSON.encode
ColdFusion.Layout.createTab
ColdFusion.Layout.collapseArea
ColdFusion.Layout.collapseAccordion
ColdFusion.Layout.createAccordionPanel
ColdFusion.Layout.disableSourceBind
78
Last updated 2/17/2016

ColdFusion.Layout.enableSourceBind

Description
If disabled, enables the source bind.
Function syntax
ColdFusion.Layout.enableSourceBind(Id)
Parameters
Id: Name of the layout area.
Usa ge
See usage in ColdFusion.Layout.disableSourceBind .
Example
79
See example in ColdFusion.Layout.disableSourceBind .
ColdFusion.FileUpload.getSelectedFiles
Description
Returns an array of objects containing the filename and size of the files selected for upload. The file size is returned in bytes. The function also returns file upload status as YES|NO|Error.
Function syntax
ColdFusion.FileUpload.getSelectedFiles(Id)
Parameters
Id: Name of the cffileupload control.
Usa ge
In a real life scenario, you normally use the uploader with other controls. For example, a form with three fields: name, emai l, and uploa der. Assume that you up load t he f iles, but forget to c lick Submit or yo u sele ct the f iles, subm it the form , but forget to click Upload. You can use this function to inform the user that there are files that have been selected for upload and provide the following details:
FILENAME: Name of the file selected for upload.
SIZE: Size of the file in bytes.
STATUS: YES|NO|Error; YES indicates a successful upload, NO indicates that the upload is yet to occur, and Error
indicates that an exception has occurred during the upload operation.
Example
The following example illustrates a scenario where the user clicks Submit and is informed about the files selected for upload:
Last updated 2/17/2016
<html> <head> <script language="javascript"> var formatNumber = function(num){ if(num < 1024) return num + " bytes"; if(num < (1024 *
1024)) return (num/1024).toFixed(2) + " KB"; if(num < (1024 * 1024 *1024)) return (num/(1024 * 1024)).toFixed(2) + " MB"; return (num/(1024 * 1024 * 1024)).toFixed(2) + " GB"; } var getSelectedList = function(id){ var files = ColdFusion.FileUpload.getSelectedFiles(id); var fileslist = ""; if(files.length) fileslist = "You have selected The following files for upload: \n\n"; for(var i=0;i < files.length; i++){ fileslist = fileslist + files[i].FILENAME + " (" + formatNumber(files[i].SIZE) + ")" if(i != files.length-1) fileslist = fileslist + "\r\n"; } if(files.length) { alert(fileslist); } } </script> </head> <body> <br> <cfform name="frmUpload" method="POST"> First Name: <cfinput type="text" name="fname" value=""><br> Last Name: <cfinput type="text" name="lname" value=""><br><br> <cffileupload url="uploadAll.cfm" name="myuploader1" hideUploadButton=false onUploadComplete="foo" /><br><br> <cfinput type="button" name="submitForm2" value="Submit" onClick="getSelectedList('myuploader1')"> </cfform> </body> </html>

See also

ColdFusion.Layout.expandAccordion
ColdFusion.Layout.disableTab
ColdFusion.Layout.enableTab
ColdFusion.Layout.expandArea
ColdFusion.Layout.getAccordionLayout
ColdFusion.Layout.getBorderLayout
80
ColdFusion.Layout.getTabLayout
ColdFusion.Layout.hideAccordion
ColdFusion.Layout.hideArea
ColdFusion.Layout.hideTab
ColdFusion.Layout.selectAccordion
ColdFusion.Layout.selectTab
ColdFusion.Layout.showAccordion
ColdFusion.Layout.showArea
ColdFusion.Layout.showTab
ColdFusion.Log.debug
ColdFusion.Log.dump
ColdFusion.Log.error
ColdFusion.Log.info
ColdFusion.Map.addEvent
ColdFusion.Map.addMarker
ColdFusion.Map.getLatitudeLongitude
ColdFusion.Map.getMapObject
ColdFusion.Map.hide
ColdFusion.Map.refresh
ColdFusion.Map.setCenter
ColdFusion.Map.setZoomlevel
Last updated 2/17/2016
ColdFusion.Map.show
ColdFusion.MediaPlayer.getPlayer
ColdFusion.Mediaplayer.getType
ColdFusion.Mediaplayer.logError
ColdFusion.Mediaplayer.resize
ColdFusion.Mediaplayer.setTitle
ColdFusion.Mediaplayer.setMute
ColdFusion.Mediaplayer.setSource
ColdFusion.Mediaplayer.setVolume
ColdFusion.Mediaplayer.startPlay
ColdFusion.Mediaplayer.stopPlay
ColdFusion.MessageBox.create
ColdFusion.MessageBox.show
81
Last updated 2/17/2016
82

ColdFusion.MessageBox.getMessageBoxObject

Description
Gets the underlying Ext JS - JavaScript Library object for the specified HTML cfmessagebox control.
Function syntax
ColdFusion.MessageBox.getMessageBoxObject(name)
See also
ColdFusion.MessageBox.create , ColdFusion.MessageBox.isMessageBoxDefined, ColdFusion.MessageBox.update , ColdFusion.MessageBox.updateMessage , ColdFusion.MessageBox.updateTitle
History
ColdFusion 9: Added this function
Parameters
Last updated 2/17/2016
Parameter Description
name The name of the message box object.
Returns
A JavaScript object.
Usa ge
Use this function to get the JavaScript object that contains all the defined properties. ----

ColdFusion.ProgressBar.getProgressBarObject

Description
Gets the progress bar object.
Function syntax
ColdFusion.ProgressBar.getProgressBarObject(name)
83

See also

ColdFusion.ProgressBar.start, ColdFusion.ProgressBar.stop
History
ColdFusion 9: Added this function
Parameters
Parameter Description
name The name of the progress bar object.
Returns
This function returns the underlying Ext JavaScript progress bar object.
Usa ge
You call this function to get the progress bar object. ----
See also
ColdFusion.ProgressBar.hide
ColdFusion.ProgressBar.reset
ColdFusion.ProgressBar.show
ColdFusion.ProgressBar.start
ColdFusion.ProgressBar.stop
ColdFusion.ProgressBar.update
ColdFusion.ProgressBar.updatestatus
Last updated 2/17/2016
ColdFusion.RichText.getEditorObject
ColdFusion.RichText.onComplete
ColdFusion.setGlobalErrorHandler
ColdFusion.Slider.disable
ColdFusion.Slider.enable
ColdFusion.Slider.getSliderObject
ColdFusion.Slider.getValue
ColdFusion.Slider.hide
ColdFusion.Slider.setValue
ColdFusion.Slider.show
ColdFusion.Tree.getTreeObject
ColdFusion.Tree.refresh
ColdFusion.Window.create
ColdFusion.Window.destroy
84
ColdFusion.Window.getWindowObject
ColdFusion.Window.hide
ColdFusion.Window.onHide
ColdFusion.Window.onShow
ColdFusion.Window.show
Last updated 2/17/2016

ColdFusion.MessageBox.isMessageBoxDefined

85
Description
Checks if a message box is defined.
Function syntax
ColdFusion.MessageBox.isMessageBoxDefined(name)

See also

ColdFusion.MessageBox.create , ColdFusion.MessageBox.getMessageBoxObject, ColdFusion.MessageBox.update ,
ColdFusion.MessageBox.updateMessage , ColdFusion.MessageBox.updateTitle
History
ColdFusion 9: Added this function
Parameters
Parameter Description
name The name of the message box object.
Returns
A Boolean value, that is, true or false.
Usa ge
Use this function to check if the message box is defined for a specific name.
See also
ColdFusion.MessageBox.update
Last updated 2/17/2016
ColdFusion.MessageBox.updateMessage
ColdFusion.MessageBox.updateTitle
ColdFusion.navigate

JavaScriptFunctionsinColdFusion9Update1

The following are the Ajax JavaScript functions added in this release:
ColdFusion.Autosuggest.getAutosuggestObject
Description
Lets you access underlying YUI AutoComplete object thereby providing fine-grained control over the object, for example attaching an event.
86
Returns
The underlying AutoComplete object.
Function syntax
ColdFusion.Autosuggest.getAutosuggestObject (Id)
Parameters
Id: Name of the auto-suggest object.
Example
<html> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <head> <cfajaximport tags="cfinput-autosuggest"> <script> var init = function() { autosuggestobj = ColdFusion.Autosuggest.getAutosuggestObject('state'); autosuggestobj.itemSelectEvent.subscribe(foo); } var foo = function(event,args) { var msg = ""; msg = msg + "Event: " + event + "\n\n"; msg = msg + "Selected Item: " + args[2] + "\n\n"; msg = msg + "Index: " + args[1]._nItemIndex + "\n\n"; alert(msg); } var getStates = function(){ return ["California","Connecticut","Colorado","Illinois","Alabama","Iowa","Utah", "Alaska"]; } </script> </head> <body> <h3>Attaching an event handler to the autosuggest object</h3> <cfform name="mycfform" method="post" > State:<BR> <cfinput type="text" name="state" autosuggest="javascript:getStates({cfautosuggestvalue})" autosuggestMinLength=1 autosuggestBindDelay=1> <cfset ajaxOnLoad("init")> </cfform> </body> </html>
ColdFusion.Layout.disableSourceBind
Description
Disables the source bind.
Function syntax
ColdFusion.Layout.disableSourceBind(Id)
Parameters
Id: Name of the layout area.
Last updated 2/17/2016
Usa ge
As sum e that you are usi ng Col df usi on. nav igat e to p opul ate c ont ent int o tab or a ccor dion pane ls. You can hav e ins tanc es where content comes from the source bind call if the source attribute is defined for cflayoutarea (and is not from ColdFusion.navigate).In such instances, you might disable the source bind to get content using Coldfusion.navigate.
Example
layout.cfm uses the templates Tab1_Src.cfm, Tab2_Src.cfm, and Tab3_Src.cfm. If you run layout.cfm, you notice that clicking
navigate populates content of tab2_src.cfm instead of navigate.cfm
Disable Source bind ensures that the content of navigate.cfm is populated in tab2_src
Enable Source Bind and then clicking tab2_src would again populate the content of tab2_srcTab 1 _S r c. c f m
<br><cfdump var="#CGI#" keys="15" label="[CGI scope]"><br>
Ta b2 _ Sr c . cf m
<br><cfdump var="#server#" label="[Server scope]"><br>
Ta b3 _ Sr c . cf m
87
<br><cfdump var="#server.coldfusion#" label="[Showing key coldfusion in server scope]"><br>
Ta b4 _ Sr c . cf m __
<br><cfdump var="#server.os#" label="[Showing key OS in server scope]"><br>
layout.cfm
<script> var navigateToTab = function(layoutId,tabId){ alert("Navigating to " + tabId); ColdFusion.Layout.selectTab(layoutId,tabId); ColdFusion.navigate('navigate.cfm',tabId); } var disableBind = function(tabId){ alert("Disabling binding on source for " + tabId); ColdFusion.Layout.disableSourceBind(tabId); } var enableBind = function(tabId){ alert("Enabling binding on source for " + tabId); ColdFusion.Layout.enableSourceBind(tabId); } </script> <cflayout type="tab" name="layout1"> <cflayoutarea name = "tab1" overflow = "auto" refreshonactivate = "yes" title = "Tab 1" source = "tab1_src.cfm"/> <cflayoutarea name = "tab2" overflow = "auto" refreshonactivate = "false" title = "Tab 2" source = "tab2_src.cfm" bindonload=false /> <cflayoutarea name = "tab3" overflow = "auto" refreshonactivate = "yes" title = "Tab 3" source = "tab3_src.cfm" /> </cflayout> <cfform name="myform"> <cfinput type="button" name="disable" value="Disable Source Bind" onClick="javascript:disableBind('tab2')"> <cfinput type="button" name="b" value="Navigate" onClick="javascript:navigateToTab('layout1','tab2')"> <cfinput type="button" name="disable" value="Enable Source Bind" onClick="javascript:enableBind('tab2')"> </cfform>
ColdFusion.Layout.enableSourceBind
Description
If disabled, enables the source bind.
Function syntax
ColdFusion.Layout.enableSourceBind(Id)
Parameters
Id: Name of the layout area.
Last updated 2/17/2016
Usa ge
See usage in ColdFusion.Layout.disableSourceBind .
Example
See example in ColdFusion.Layout.disableSourceBind .
ColdFusion.FileUpload.getSelectedFiles
Description
Returns an array of objects containing the filename and size of the files selected for upload. The file size is returned in bytes. The function also returns file upload status as YES|NO|Error.
Function syntax
ColdFusion.FileUpload.getSelectedFiles(Id)
Parameters
Id: Name of the cffileupload control.
Usa ge
In a real life scenario, you normally use the uploader with other controls. For example, a form with three fields: name, emai l, and uploa der. Assume that you up load t he f iles, but forget to c lick Submit or yo u sele ct the f iles, subm it the form , but forget to click Upload. You can use this function to inform the user that there are files that have been selected for upload and provide the following details:
88
FILENAME: Name of the file selected for upload.
SIZE: Size of the file in bytes.
STATUS: YES|NO|Error; YES indicates a successful upload, NO indicates that the upload is yet to occur, and Error
indicates that an exception has occurred during the upload operation.
Example
The following example illustrates a scenario where the user clicks Submit and is informed about the files selected for upload:
<html> <head> <script language="javascript"> var formatNumber = function(num){ if(num < 1024) return num + " bytes"; if(num < (1024 *
1024)) return (num/1024).toFixed(2) + " KB"; if(num < (1024 * 1024 *1024)) return (num/(1024 * 1024)).toFixed(2) + " MB"; return (num/(1024 * 1024 * 1024)).toFixed(2) + " GB"; } var getSelectedList = function(id){ var files = ColdFusion.FileUpload.getSelectedFiles(id); var fileslist = ""; if(files.length) fileslist = "You have selected The following files for upload: \n\n"; for(var i=0;i < files.length; i++){ fileslist = fileslist + files[i].FILENAME + " (" + formatNumber(files[i].SIZE) + ")" if(i != files.length-1) fileslist = fileslist + "\r\n"; } if(files.length) { alert(fileslist); } } </script> </head> <body> <br> <cfform name="frmUpload" method="POST"> First Name: <cfinput type="text" name="fname" value=""><br> Last Name: <cfinput type="text" name="lname" value=""><br><br> <cffileupload url="uploadAll.cfm" name="myuploader1" hideUploadButton=false onUploadComplete="foo" /><br><br> <cfinput type="button" name="submitForm2" value="Submit" onClick="getSelectedList('myuploader1')"> </cfform> </body> </html>
Coldfusion.fileUpload.setUrl
Description
Used to set URL for the fileupload control dynamically.
Returns
Nothing
Function syntax
Last updated 2/17/2016
ColdFusion.fileUpload.setUrl(id, url)
Parameters
Id: Name of upload control.
Url: URL can be an absolute URL, relative URL, or fully qualified URL.
Example
<script language="javascript"> var uploadDone = function(result){ alert("File uploaded"); } var setUploadUrl = function(id) { var selectedFiles = ColdFusion.FileUpload.getSelectedFiles(id); var uploadUrl = "/manual/ajaxui/cffileupload/setUrl/includes/_uploadall.cfm"; alert("Upload URL : " + uploadUrl); if(selectedFiles.length){ ColdFusion.FileUpload.setURL(id,uploadUrl); ColdFusion.FileUpload.startUpload(id); } } var callbackhandler = function(obj) { var fileName = obj["FILENAME"]; var status = obj["STATUS"]; var message = obj["MESSAGE"]; var msg = "In callbackhandler()" + "\n\n" + "FILENAME: " + fileName + "\n\n" + "STATUS: " + status + "\n\n" + "MESSAGE: " + message alert(msg); } var errorhandler = function() { alert("In errorhandler()"); } var uploadcompleted = function() { alert("All files have been uploaded successfully"); } </script> <cfform name="frmUpload"> <br> <cffileupload name="uploader" hideuploadbutton="true" onComplete="uploadDone" onError="errorhandler" onUploadComplete="uploadcompleted"> <br> <cfinput type="button" name="submit" value="Click to set URL and Upload Files" onClick="setUploadUrl('uploader')"> </cfform>
ColdFusion.grid.getSelectedRows
Description
Used to fetch data for the selected rows in the grid.
89
Returns
An array of objects that contains row data.
Function syntax
ColdFusion.grid.getSelectedRows(id)
Parameters
Id: Name of the grid defined using cfgrid.
See also
FileUpload
Usa ge
See the example in ColdFusion.grid.clearSelectedRows .
Example
See the example in ColdFusion.grid.clearSelectedRows .
ColdFusion.grid.clearSelectedRows
Description
Used to clear the selected rows in the grid.
Returns
Nothing
Function syntax
ColdFusion.grid.clearSelectedRows(id)
Last updated 2/17/2016
Parameters
Id: Name of the grid defined using cfgrid.
Usa ge
See the following example.
Example
Employee.cfm
<html> <head> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1­transitional.dtd"> <cfajaxproxy cfc="emp" jsclassname="emputils"> <script language="javascript"> var emp = new emputils(); var deleteAllSelectedRows = function(grid) { emp.setHTTPMethod("POST"); emp.deleteEmployees(getAllSelectedRows(grid,false)); ColdFusion.Grid.refresh(grid); } var getAllSelectedRows = function(grid,showalert) { obj = ColdFusion.Grid.getSelectedRows(grid); jsonbj = ColdFusion.JSON.encode(obj); if(showalert) alert(jsonbj); return obj; } var clearAllSelectedRows = function(grid) { ColdFusion.Grid.clearSelectedRows(grid); } </script> </head> <body> <cfform> <cfgrid format="html" name="empListing" selectmode="edit" bind="cfc:emp.getEmployees({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})" onchange="cfc:emp.editEmployees({cfgridaction},{cfgridrow},{cfgridchanged})" autowidth="true" multirowselect=true delete="true" insert="true" title="Employee database" pagesize="25" > <cfgridcolumn name="EMP_ID" header="EMP_ID" select="false" display="false"> <cfgridcolumn name="FIRSTNAME" header="First Name" select="true" /> <cfgridcolumn name="LASTNAME" header="Last Name" select="true" /> <cfgridcolumn name="DEPARTMENT" header="Department" select="true" /> <cfgridcolumn name="EMAIL" header="Email" select="true" /> </cfgrid> <br> <cfinput type="button" onClick="javascript:getAllSelectedRows('empListing',true)" name="getRows" value="Get Selected Rows"> <cfinput type="button" onClick="javascript:clearAllSelectedRows('empListing')" name="clearRows" value="Clear Selected Rows"> <cfinput type="button" onClick="javascript:deleteAllSelectedRows('empListing')" name="deleteRows" value="Delete Selected Rows"> </cfform> </body> </html>
90
Employee.cfc
<cfcomponent> <cfscript> empQuery = new query(name="emps", datasource="cfdocexamples"); remote any function getEmployees(page,pageSize,gridsortcolumn="EMP_ID",gridsortdirection="ASC",empName) { var orderBy = "EMP_ID"; var mysql = "SELECT Emp_ID, FirstName, LastName, EMail, Department, Email FROM Employees"; if(isdefined("arguments.empName") and trim(arguments.empName) neq ""){ mysql = mysql & " WHERE " & "firstname = '#arguments.empName#'"; } if(arguments.gridsortcolumn eq ""){ mysql = mysql & " ORDER BY " & orderBy; } mysql = mysql & " " & gridsortdirection; return QueryConvertForGrid(empQuery.execute(sql=mysql).getResult(), page, pageSize); } remote void function editEmployees(gridaction,gridrow,gridchanged) { switch(gridaction) { case "I": { var eFName = gridrow["FIRSTNAME"]; var eLNAme = gridrow["LASTNAME"]; var eDept = gridrow["DEPARTMENT"]; var eEmail = gridrow["EMAIL"]; var insertSql = "insert into Employees(FirstName,LastName,Department,Email) values (" & "'" & eFName & "', '" & eLName & "', '" & eDept & "', '" & eEmail & "')"; empQuery.execute(sql=insertSql); break; } case "U": { var empId = gridrow["EMP_ID"]; var changedCol = structkeylist(gridchanged); var updateSql = "UPDATE Employees SET " & changedCol & "='" & gridchanged[changedCol] & "' WHERE emp_id=" & empId; empQuery.execute(sql=updateSql); break; } case "D": { deleteEmployees(gridrow); } } } remote void function deleteEmployees(empdata) { var i = 1; var emp = {}; if(isArray(empdata) and not ArrayIsEmpty(empdata)){ for(emp in empdata){ if(isStruct(emp) and structkeyexists(emp,"emp_id")){ empid = emp["emp_id"]; writelog("deleting " & empid); //var deleteSql = "delete from Employees where emp_id=" & empid; //empQuery.execute(sql=deleteSql); } } } } </cfscript> </cfcomponent>
In this example, setting multirowselect=true enables performing of batch operations on grid data, such as deleting multiple records.In the deleteemployees functions, two lines have been commented out to prevent accidental deletion of data (since it is a batch operation). To see deletion, uncomment the code.The form has a deleteAllSelectedRows button that illustrates how records can be deleted externally. That is, without using the delete button built in to the grid. The same approach can be used to perform other batch operations such as moving multiple files to another folder or batch updates.
Note: Set the httpMethod to POST on the Proxy object carefully to avoid "request URI too large" errors as shown in the deleteAllSelectedRows method in Employee.cfm.
ColdFusion.Map.show
Description
Shows the map if it is hidden.
Last updated 2/17/2016
Function syntax
ColdFusion.Map.show(Id)
Parameters
Id: Name of the map.
Example
<script> function showMap(mapId) { ColdFusion.Map.show(mapId); } function hideMap(mapId) { ColdFusion.Map.hide(mapId); } </script> <a href="##" id="a1" onclick="return showMap('mainMap')">Show Map</a> | <a href="##" id="a1" onclick="return hideMap('mainMap')">Hide Map</a> <cfmap zoomlevel = "12" name = "mainMap" showcentermarker= "true" centeraddress = "The Key Learning centre, Oxford, UK" title="Venue Address" hideborder=false collapsible=true initShow=false/>
ColdFusion.Map.hide
Description
If displayed, hides the map.
Function syntax
ColdFusion.Map.hide(Id)
Parameters
91
Id: Name of the map.
Example
See example in ColdFusion.Map.show
ColdFusion.Map.refresh
Description
Reloads the map.
Function syntax
ColdFusion.Map.refresh (Id)
Parameters
Id: Name of the map.
Usa ge
If the map is embedded within spry collapsible panels or divs that are hidden on display, that is the map container is displayed while the actual map is hidden, use this function to force the map to display.
Example
<script type="text/javascript" src="/CFIDE/scripts/ajax/spry/includes_minified/SpryCollapsiblePanel.js" ></script> <link type="text/css" href="/CFIDE/scripts/ajax/spry/widgets/collapsiblepanel/SpryCollapsiblePanel.css" rel="stylesheet"> <div id="cp" class="CollapsiblePanel" style="width:500px;"> <div class="CollapsiblePanelTab" tabindex="0">SHOW MAP</div> <div class="CollapsiblePanelContent"> <cfmap width="500" height="200" zoomlevel="12" name="mainMap" markercolor="333444" showscale="false" typecontrol="none" showcentermarker="true" centeraddress="Th e Key Learning centre, Oxford, UK" > </cfmap> </div> </div> <script type="text /javascript"> var myTabClick = function() { !cpanel.isOpen() ? cpanel.open() : cpanel.close(); cpanel.focus(); ColdFusion.Map.refresh('mainMap'); } var cpanel = new Spry.Widget.CollapsiblePanel("cp", {contentIsOpen:false}); cpanel.onTabClick = myTabClick; </script>
ColdFusion.Grid.getTopToolbar
Last updated 2/17/2016
Description
Gets the top toolbar that can be used to add a control, for example icon or button.
Function syntax
ColdFusion.getTopToolbar(Id)
Parameters
Id: Name of the grid.
Example
See example in ColdFusion.Grid.refreshBottomToolbar .
ColdFusion.Grid.getBottomToolbar
Description
Gets bottom toolbar that can be used to add a control, for example icon or button.
Function syntax
ColdFusion.Grid.getBottomToolbar(Id)
Parameters
92
Id: Name of the grid.
Example
See example in ColdFusion.Grid.refreshBottomToolbar .
ColdFusion.Grid.showTopToolbar
Description
Displays the top toolbar that can be used to add a control, for example icon or button.
Function syntax
ColdFusion.Grid.showTopToolbar(Id)
Parameters
Id: Name of the grid.
Example
See example in ColdFusion.Grid.refreshBottomToolbar .
ColdFusion.Grid.hideTopToolbar
Description
Hides the top toolbar that can be used to add a control, for example icon or button.
Function syntax
ColdFusion.Grid.hideTopToolbar(Id)
Parameters
Id: Name of the grid.
Example
Last updated 2/17/2016
See example in ColdFusion.Grid.refreshBottomToolbar .
ColdFusion.Grid.showBottomToolbar
Description
Shows bottom toolbar that can be used to add a control, for example icon or button.
Function syntax
ColdFusion.Grid.showBottomToolbar(Id)
Parameters
Id: Name of the grid.
Example
See example in ColdFusion.Grid.refreshBottomToolbar .
ColdFusion.Grid.hideBottomToolbar
Description
Hides the bottom toolbar that can be used to add a control, for example icon or button.
Function syntax
93
ColdFusion.Grid.hideBottomToolbar(Id)
Parameters
Id: Name of the grid.
Example
See example in ColdFusion.Grid.refreshBottomToolbar .
ColdFusion.Grid.refreshTopToolbar
Description
Refreshes the top toolbar that can be used to add a control, for example icon or button. This function internally calls the JavaScript function
Function syntax
ColdFusion.Grid.refreshTopToolbar(Id)
Parameters
ColdFusion.Grid.showTopToolbar .
Id: Name of the grid.
Example
See example in ColdFusion.Grid.refreshBottomToolbar .
ColdFusion.Grid.refreshBottomToolbar
Description
Refreshes the bottom toolbar that can be used to add a control, for example icon or button. This function internally calls the JavaScript function
Function syntax
ColdFusion.Grid.refresheBottomToolbar(Id)
ColdFusion.Grid.showBottomToolbar .
Last updated 2/17/2016
Parameters
Id: Name of the grid control.
Example
grid.cfc
<cfcomponent> <cfscript> remote any function getEmployees(page,pageSize,gridsortcolumn="EMP_ID",gridsortdirection="ASC"){ var startRow = (page-1)*pageSize; var endRow = page*pageSize; if(!isdefined("arguments.gridsortcolumn") or isdefined("arguments.gridsortcolumn") and trim(arguments.gridsortcolumn) eq "") gridsortcolumn = "EMP_ID"; if(!isdefined("arguments.gridsortdirection") or isdefined("arguments.gridsortdirection") and arguments.gridsortdirection eq "") gridsortdirection = "ASC"; var mysql = "SELECT Emp_ID, FirstName, EMail, Department FROM Employees"; if(isdefined("arguments.gridsortcolumn") and arguments.gridsortcolumn neq "") mysql = mysql & " ORDER BY " & gridsortcolumn; if(isdefined("arguments.gridsortdirection") and arguments.gridsortdirection neq "") mysql = mysql & " " & gridsortdirection ; rs1 = new query(name="team", datasource="cfdocexamples", sql=mysql).execute(); return QueryConvertForGrid(rs1.getResult(), page, pageSize); } remote any function editEmployees(gridaction,gridrow,gridchanged){ writelog("edit employee info"); } </cfscript> </cfcomponent>
grid.cfm
<script> var refreshToolbar = function(id,type){ type == "top" ? ColdFusion.Grid.refreshTopToolbar(id) : ColdFusion.Grid.refreshBottomToolbar(id); } var hideToolbar = function(id,type){ type == "top" ? ColdFusion.Grid.hideTopToolbar(id) : ColdFusion.Grid.hideBottomToolbar(id); } var showToolbar = function(id,type){ (type == "top") ? ColdFusion.Grid.showTopToolbar(id) : ColdFusion.Grid.showBottomToolbar(id); } var handleToolbar = function(id,type){ if(type == "top"){ tbar = ColdFusion.Grid.getTopToolbar(id); tbar.addButton({ text: "Add User Account", tooltip: "Add a user account", handler: addUserAccount }); } else{ bbar = ColdFusion.Grid.getBottomToolbar(id); bbar.add(new Ext.Toolbar.Separator()); bbar.addButton({ text: "Delete User Account", tooltip: "Delete a user account", handler: deleteUserAccount }); } } var GetUserInfo = function(){ alert("Retrieving user account"); } var addUserAccount = function(){ alert("Adding new user account") } var deleteUserAccount = function(){ alert("Deleting user account") } </script> <cfform> <br> <cfinput type="button" onClick="showToolbar('empGrid','top')" name="btn1" value="Show Top Toolbar"> <cfinput type="button" onClick="handleToolbar('empGrid','top')" name="btn2" value="Add button to Top Toolbar"> <cfinput type="button" onClick="refreshToolbar('empGrid','top')" name="btn3" value="Refresh Top Toolbar"> <cfinput type="button" onClick="hideToolbar('empGrid','top')" name="btn4" value="Hide Top Toolbar"> <br><br> <cfgrid format="html" name="empGrid" width="800" pagesize=5 sort=true title="Employee database" collapsible="true" insert="yes" delete="yes" bind="cfc:grid.getEmployees({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})" onChange="cfc:grid.editEmployees({cfgridaction},{cfgridrow},{cfgridchanged})" selectMode="edit" > <cfgridcolumn name="Emp_ID" display=false header="ID" /> <cfgridcolumn name="FirstName" display=true header="First Name"/> <cfgridcolumn name="Email" display=true header="Email"/> <cfgridcolumn name="Department" display=true header="Department" /> </cfgrid> <br><br> <cfinput type="button" onClick="hideToolbar('empGrid','bottom')" name="btn5" value="Hide Bottom Toolbar"> <cfinput type="button" onClick="showToolbar('empGrid','bottom')" name="btn6" value="Show Bottom Toolbar"> <cfinput type="button" onClick="handleToolbar('empGrid','bottom')" name="btn7" value="Add button to Bottom Toolbar"> <cfinput type="button" onClick="refreshToolbar('empGrid','bottom')" name="btn8" value="Refresh Bottom Toolbar"> </cfform>
94
Last updated 2/17/2016

Chapter 6: Script Functions Implemented as CFCs

Script Functions Implemented as CFCs

Script functions were added in ColdFusion 9. They are implemented as ColdFusion Components. These
functions extend the usage of the tags cfmail, cfpdf, cfquery, cfhttp, cfstoredproc, and cfftp to CFScript.
Accessing the functions
Function summary
ftp
95
http
mail
pdf
query
storedproc
Script functions implemented as CFCs in ColdFusion 9 Update 1
Last updated 2/17/2016

Accessing the functions

Script functions are available in the following location: cf_root\CustomTags\com\adobe\coldfusion. Ensure that you do not delete the default custom tag mapping listed in the ColdFusion Administrator (Extensions > Custom Tag Paths > Custom tag mappings). Script functions work if they are either in the default location or web root. If you have the functions in any other location, add a /com mapping in the ColdFusion Administrator that points to the new location (for example C:\com).
Note: Values of the attributes set in a service action, for example, mail.send(body="test mail") are transient in nature. They are not accessible after the action completes. Accessing the attributes using implicit getters results in erro r whereas any attributes set using either implicit setters or the init method call are retained and can be accessed using implicit getters.

Function summary

The following table lists the script functions and the equivalent ColdFusion tag.
Function Equivalent ColdFusion Tag
ftp cfftp
96
http cfhttp
mail cfmail
pdf cfpdf
query cfquery
storedproc cfstoredproc
ftp
Description
Used to implement File Transfer Protocol (FTP) operations using CFScript.
Syntax
Mode Syntax
Creating the service new ftp() or createObject("component","ftp")
Initializing the attributes Any one of the following:
ftpService=new ftp(attribute-value pair)
ftpService.setAttributes(_attribute-value pair_)
ftpService.setA_ttributeName_(attribute_value)
ftpService.action_method(attribute-value_pair)
Executing the service action ftpService.action_method(attribute-value_pair)
Last updated 2/17/2016
Properties
actionparam buffersize connection passive
password port proxyserver retrycount
server stoponerror timeout username
fingerprint key passphrase secure
ASCIIExtensionList directory existing failifexists
item localfile name new
remotefile result transfermode allosize
All attributes supported by the tag cfftp can be used as attribute-value pairs. For example,
<cfftp userName="myUserName">
can be used as
ftpService.setUserName("myUserName");
97
For details, see the Attributes section for the cfftp tag.
See also
cfftp , Function summary
History
ColdFusion 9: Added this function.
Methods
The following FTP actions are available as methods. All methods have similar arguments and syntax.
open close quote site
allo acct changeDir createDir
listDir removeDir getFile putFile
rename remove getCurrentDir getCurrentUrl
existDir existsFile exists
Description All methods correspond to the FTP actions supported by the tag
cfftp. For details of each method, refer to the relevant section for the tag cfftp .
Returns All methods return a component with the following proper ties set:
Last updated 2/17/2016
prefix: Equivalent to the result attribute or cfftp scope
result: Applicable only for action="listdir"
Syntax ftpService.methodName(attribute-value pair)
Arguments All attributes supported by the tag cfftp.
setAttributes
Description Sets attributes for the ftp function.
Returns Nothing
Syntax ftpService.setAttributes (attribute-value pair)
Arguments All attributes supported by the tag cfftp.
getAttributes
Description Gets the attributes that were set for the ftp function.
98
Returns Returns a struct with all or some attribute values.
Syntax ftpService.get_Attributes_ (attributelist)
Arguments A comma-separated list of attributes. If no list is specified, all
defined attributes are returned.
clear
Description Removes all attributes added for the ftp function.
Returns Nothing
Syntax ftpService.clear()
Arguments None
Usa ge
This function corresponds to the cfftp tag. For details, see the Usage section for the tag cfftp .
Example
Last updated 2/17/2016
<cfscript> /* Create a new ftp Service*/ ftpService = new ft p(); /* Set attributes using implicit setters */ ftpService.setUsername("myUsername"); ftpService.setPassword("myPassword"); ftpService.setServer("myFtpServer"); ftpService.setStopOnError("true"); ftpService.setConnection("conn"); /* Open connection to ftp server */ WriteOutput("<h4>Open a connection</h4>"); result = ftpService.open(); WriteOutput("<p>Did it succeed? " & result.getPrefix().succeeded & "<br></p>"); /* Get current directory */ WriteOutput("<h4>Get current directory</h4>"); result = ftpService.getcurrentdir(); WriteOutput("<p>Current Directory: " & "'" & result.getPrefix().returnvalue & "'" & "<br></p>"); /* List contents of the current directory */ WriteOutput("<h4>List directory contents</h4>"); result = ftpService.listdir(directory = "/",name="listDirs"); displayListing(result.getResult()); /* Move a file to the ftp server */ WriteOutput("<h4>Move File to Remote Server</h4>"); lFile = "C:\temp\artifacts.xml"; rFile = "artifacts.xml"; result = ftpService.putFile(transferMode="binar y", localfile=lFile, remoteFile=rFile); WriteOutput("<p>Did it succeed? " & result.getPrefix().succeeded & "<br></p>"); /* Close connection to the ftp server */ WriteOutput("<h4>Close the connection</h4>"); ftpService.close(connection="conn"); WriteOutput("<p>Did it succeed? " & result.getPrefix().succeeded & "<br></p>"); </cfscript> <cffunction name="displayListing" hint="display ftp files"> <cfargument name="filesToList" required="true"> <cftable query = "filesToList" HTMLTable = "Yes" colHeaders = "Yes" border="1" maxrows="10"> <cfcol header = "<b>Name</b>" text = "#name#"> <cfcol header = "<b>Path</b>" text = "#path#"> <cfcol header = "<b>URL</b>" text = "#url#"> <cfcol header = "<b>Length</b>" text = "#length#"> <cfcol header = "<b>LastModified</b>" text = "#DateFormat(lastmodified)#"> <cfcol header = "<b>IsDirectory</b>" text = "#isdirectory#"> </cftable> </cffunction>

http

Description
99
Used in CFScript to generate an HTTP request and handle the response from the server.
Syntax
Mode Syntax
Creating the service new http() or createObject("component","http")
Initializing the attributes Any one of the following:
httpService=new http(_attribute-value_pair_)
httpService.setAttributes(_attribute-value_pair_)
httpService.set_AttributeName_(attribute_value)
httpService.send(attribute-value_pair)
Executing the service action httpService.send(_attribute-value_pair_)
Properties
url charset clientcert clientcertpassword
columns delimiter file firstrowasheaders
getasbinary method multipart multiparttype
name password path port
proxyserver proxyport proxyuser proxypassword
redirect resolveurl result textqualifier
throwonerror timeout useragent username
All attributes supported by the tag cfhttp can be used as attribute-value pairs. For example,
Last updated 2/17/2016
<cfhttp name="onerow">
can be used as
httpService.setName("onerow");
For details of the attributes, see the Attributes section for the tag cfhttp .
See also
cfhttp __, Function summary
History
ColdFusion 9: Added this function.
Methods
addParam
100
Description Used to add cfhttpparam tags. For example, to specify http POST
Syntax httpService.addParam(attribute-value pair)
Returns Nothing
Arguments All attributes supported by cfhttpparam tag can be used as
operations in CFScript. Specifies parameters to build an HTTP request.
attribute-value pairs.
send
Description Used to generate an HTTP request and handle the response from
Returns A component on which the following methods can be invoked:
the server.
GetResult(): To access the query object returned by the server if a name attribute is specified.
GetPrefix(): To access the cfhttp scope. This is equivalent to the result attribute of the cfhttptag.
Syntax httpService.send(attribute_value pair)
Arguments All attributes supported by the cfhttpparam tag.
setAttributes
Description Sets attributes for the http function.
Returns Nothing
Syntax httpService.setAttributes (attribute-value pair)
Arguments All arguments supported by the cfhttp tag.
Last updated 2/17/2016
getAttributes
Description Gets attributes that were set for the http function.
Returns Returns a struct with all or some of the service tag attribute values.
Syntax httpService.get_Attributes_(attribute_list)
101
Arguments A comma-separated list of attributes. If no list is specified, all
defined attributes are returned.
clearAttributes
Description Removes all attributes added for the http function.
Returns Nothing
Syntax httpService.clearAttributes(attribute_list)
Arguments A comma-separated list of attributes.
clearParams
Description Removes cfhttpparam tags that were added using the addParam
Returns Nothing
Syntax httpService.clearParams()
Arguments None
method.
clear
Description Removes all attributes and cfhttpparam tags that were added
Returns Nothing
Syntax httpService.clear()
Arguments None
using the addParam method.
Usa ge
This function corresponds to the cfhttp tag. For usage details, see the Usage section for cfhttp in the CFML Reference.
Example
Last updated 2/17/2016
<!--- Get Video ---> <!--- <cfset videoName = "<video path>\hello.wmv"> <cfset videoFileName = "hello.wmv"> ---> <!--- Set User Account Data
---> <!--- <cfset clientKey = "enter client key from google"/> <cfset devKey = "ebtdev key from google>"/> ---> <cfscript> /* youtube uplaod url */ youTubeUploadURL = "http://uploads.gdata.youtube.com/feeds/api/users/default/uploads"; /* video to upload */ videoName = ExpandPath('./hello.wmv'); videoFileName = "hello.wmv"; /* set user account data */ clientKey = "enter client key from google"; devKey = "ewnter dev key from google"; /* create new http service */ httpService = new http(); /* set attributes using implicit setters */ httpService.setMethod("post"); httpService.setCharset("utf-8"); httpService.setUrl("https://www.google.com/accounts/ClientLogin"); /* add httpparams using addParam() */ httpService.addParam(type="formfield",name="accountType",value="HOSTED_OR_ GOOGLE"); httpService.addParam(type="formfield",name="Email",value="enter gmail id"); httpService.addParam(type="formfield",name="Passwd",value="enter password"); httpService.addParam(type="formfield",name="service",value="youtube"); httpService.addParam(type="formfield",name="source",value="youtubecode"); /* make the http call to the URL using send() */ result = httpService.send().getPrefix(); /* process the filecontent returned */ content = listtoarray(result.filecontent,chr(10)); for(i=1;i lte arraylen(content);i++) { item = content[i]; authdata[listFirst(item, "=")] = listRest(i tem, "="); } </cfscript> <!--- Create ATOM XML and save to a file to be sent with video ---> <cfsavecontent variable="meta"> <cfoutput> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007"> <media:group> <media:title type="plain">WithOutQuotes</media:title> <media:description type="plain">Test Description</media:description> <media:category scheme="http://gdata.youtube.com/schemas/2007/categories.cat">People </media:category> <media:keywords>yourvideo</media:keywords> </media:group> </entry> </cfoutput> </cfsavecontent> <cfscript> tmpfile = expandPath("./meta.xml"); FileWrite(tmpfile,trim(meta)); /* use the httpService created above */ httpService.setUrl("http://uploads.gdata.youtube.com/feeds/api/users/default/ uploads"); httpService.setTimeOut(450); httpService.setMultipartType("related"); /* clear params first */ httpService.clearParams(); /* add httpparams using addParam() */ httpService.addParam(type="header",name="Authorization", value="GoogleLogin auth=#authdata.auth#"); httpService.addParam(type="header",name="X-GData-Client", value="#variables.clientkey#"); httpService.addParam(type="header",name="X-GData-Key", value="key=#variables.devkey#"); httpService.addParam(type="header",name="Slug",value="#videoFileName#"); httpService.addParam(type="file",name="API_XML_Request",file="#tmpfile#", mimetype= "application/atom+xml"); httpService.addParam(type="file",name="file",file="#videoName#",mimetype ="video/*"); /* make the http call to the URL using send() */ result = httpService.send().getPrefix(); if(result.statuscode contains "201") { WriteOutput("Your video has been successfully uploaded to YouTube"); } else { WriteOutput("There was a problem uploading the video. Status code returned was " & result.statuscode); } </cfscript>
102

mail

Description
Used to sends an e-mail message, that optionally contains query output, using an SMTP server.
Syntax
Mode Syntax
Creating the service new mail() or createObject("component", "mail")
Initializing the attributes Any one of the following:
mailService=new mail(_attribute-value_pair_)
mailService.setAttributes(_attribute-value_pair_)
mailService.set_AttributeName_(attribute_value)
mailService.send(attribute-value_pair)
Executing the service action mailService.send(_attribute-value_pair_)
Properties
Last updated 2/17/2016
Loading...