Page 2
Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites.
Page 6
cfcase <cfcase value = "value or delimited set of values" delimiters = "delimiter characters"> cfcatch <cfcatch type = "exceptiontype"> Exception processing code here </cfcatch> cfchart Syntax 1 <!--- This syntax uses an XML file or string to specify the chart style. ---> <cfchart style = "XML string or filename">...
Page 7
cfcollection <cfcollection action = "action" collection = "collection_name" path = "path_to_verity_collection" language = "language" name = "queryname" categories = "yes" or "no"> cfcomponent <cfcomponent extends ="anotherComponent" output = "yes" or "no" style = "rpc" or "document" namespace = "default service namespace" serviceportname = "port element name"...
Page 8
HTML and CFML code </cfdocument> cfdocumentitem <cfdocument ...> Syntax 1 <cfdocumentitem type = "pagebreak"/> Syntax 2 <cfdocumentitem type = "header" or "footer"> Header/footer text </cfdocumentitem> </cfdocument> cfdocumentsection <cfdocument ...> <cfdocumentsection margintop = "number" marginbottom = "number" marginleft = "number" marginright = "number"> HTML, CFML, and cfdocumentitem tags </cfdocumentsection>...
Page 10
The following attributes are supported in HTML and XML only class = "form class" enctype = "Internet media type" id = "HTML id" onload = "load event script" onreset = "reset event script" target = "target window or frame"> </cfform> cfformgroup <cfformgroup type = "group type"...
Page 11
new = "file or directory name" proxyServer = "proxy server" passive = "yes" or "no"> result = "result_name" cfftp action = "listDir" <cfftp action = "listDir" </cfftp> cffunction <cffunction name = "methodName" returnType = "dataType" roles = "securityRoles" access = "methodAccess" description = "function description"...
Page 12
sortDescendingButton = "text"> Zero or more cfgridcolumn and cfgridrow tags </cfgrid> cfgridcolumn <cfgridcolumn name = "column_name" header = "header" width = "column_width" type = "type" display = "yes" or "no" select = "yes" or "no" font = "column_font" fontSize = "size" italic = "yes"...
Page 13
multipart = "yes or no" path = "path" file = "filename" name = "queryname" columns = "query_columns" firstrowasheaders = "yes" or "no" delimiter = "character" textQualifier = "character" result = "result_name" cfhttpparam tags [optional for some methods] </cfhttp> cfhttpparam <cfhttpparam type = "transaction type"...
Page 14
onKeyDown = "JavaScript or ActionScript" onMouseUp = "JavaScript or ActionScript" onMouseDown = "JavaScript or ActionScript" onChange = "JavaScript or ActionScript" onClick = "JavaScript or ActionScript" firstDayOfWeek = "day name" dayNames = "days-of-the-week labels" monthNames = "month labels" enabled = "Yes" or "No" visible = "Yes"...
Page 15
Syntax 4B <!--- This syntax invokes a web service. This syntax shows instantiation with the cfobject tag. This cfinvoke syntax applies to instantiating a web service with the cfobject tag and to instantiating a web service with the CreateObject function. ---> <cfobject webservice = "web service name"...
Page 16
password = "password-string" roles = "roles"> ...> </cflogin> cfloginuser <cfloginuser name = "name" password = "password-string" roles = "roles"> cflogout <cflogout> cfloop cfloop: index loop <cfloop index = "parameter_name" from = "beginning_value" to = "ending_value" step = "increment"> HTML or CFML code </cfloop>...
Page 17
(Optional) Mail message body and/or cfhttpparam tags </cfmail> cfmailparam <cfmail to = "recipient" subject = "msg_subject" from = "sender" ...more attributes... > <cfmailparam file = "file-name" type ="media type" contentID = "content ID" disposition = "disposition type"> <cfmailparam name = "header-name" value = "header-value"...
Page 18
cfobject: web service object <cfobject webservice= "http://..?wsdl" or "name set in Administrator" name = "myobjectname"> cfobjectcache <cfobjectcache action = "clear"> cfoutput <cfoutput query = "query_name" group = "query_column" groupCaseSensitive = "yes" or "no" startRow = "start_row" maxRows = "max_rows_output"> </cfoutput> cfparam <cfparam name = "param_name"...
Page 19
username = "username" password = "password" maxRows = "number" blockFactor = "blocksize" timeout = "seconds" cachedAfter = "date" cachedWithin = "timespan" Either of the following: debug = "yes" or "no" debug > result = "result_name" </cfquery> cfqueryparam <cfquery name = "query_name" dataSource = "ds_name"...
Page 20
Syntax 2 <!--- Syntax 2 - Use this syntax with Crystal Reports. ---> <cfreport report = "report_path" dataSource = "ds_name" type = "type" timeout = "number of seconds" orderBy = "result_order" username = "username" password = "password" formula = "formula"> </cfreport>...
Page 21
previousCriteria = "criteria" language = "language"> cfselect <cfselect name = "name" label = "label" style = "style specification" size = "integer" required = "yes" or "no" message = "text" onError = "text" multiple = "yes" or "no" query = "queryname" value = "text"...
Page 22
cfswitch <cfswitch expression = "expression"> One or more cfcase tags Zero or one cfdefaultcase tags </cfswitch> cftable <cftable query = "query_name" maxRows = "maxrows_table" colSpacing = "number_of_spaces" headerLines = "number_of_lines" HTMLTable border colHeaders startRow = "row_number"> </cftable> cftextarea <cftextarea name = "name" label = "text"...
Page 23
cftransaction <cftransaction action = "begin" or "commit" or "rollback" isolation = "read_uncommitted" or "read_committed" or "repeatable_read" > </cftransaction> cftree <cftree name = "name" format="applet", "flash", xml, or "object" required = "yes" or "no" delimiter = "delimiter" completePath = "yes" or "no" appendKey = "yes"...
CFML functions Array functions array value array array array position array position value array array array array dimension array value array minimum_size array start_pos end_pos value array sort_type , sort_order array array position1 position2 array delimiter value number list delimiters Conversion functions array delimiter...
(" ") date day_of_week (" ") date (" ") date (" ") date date date_time_object date string year number date mask string date/time-string time mask date date month_number date/time-string pop-conversion date date time mask date date Decision functions absolute_path absolute_path condition string_expression1 string_expression2...
value value string string string structure , " ") structure value Display and formatting functions string length (" " [, " " ]) date mask number number number radix locale inLocale string version string version string length number type date mask currency-number type...
International functions (" ", " ") conversion-type date scope_name date_time_object locale inLocale number type date mask currency-number type string string string number mask string date/time-string currency-string string time mask scope_name charset new_locale List functions array sort_type sort_order array delimiter string number string length...
list, value delimiters list, value delimiters string list1 list2 Mathematical functions number number array array number number number1 number2 number start length number start length number mask start length number number1 number2 number count number count number1 number2 number number number number number...
Caller scope ColdFusion MX supports the Caller scope as a structure. Client variables The following client variables are reserved: Client.CFID Client.CFToken Client.HitCount Client.LastVisit Client.TimeCreated Client.URLToken Server variables Use the Server prefix to reference server variables, as follows: Server.ColdFusion.ProductName Server.ColdFusion.ProductVersion Server.ColdFusion.ProductLevel Server.ColdFusion.SerialNumber Server.ColdFusion.SupportedLocales Server.ColdFusion.AppServer...
<CFSET Request.field_name3 = "value"> Each nested tag can access the variable with the cfoutput tag, as follows: <CFOUTPUT>#Request.field_name1#</CFOUTPUT> Form variable ColdFusion supports the Form variable FieldNames. FieldNames returns the names of the fields on a form. You use it on the action page associated with a form, as follows: Form.FieldNames ColdFusion tag-specific variables Some ColdFusion tags return data as variables.
CFCATCH.Column CFCATCH.KnownColumn CFCATCH.Line CFCATCH.KnownLine CFDIRECTORY variables tag, with , returns a query cfdirectory action=list object as follows, where is the name attribute queryname value: queryname.Name queryname.Size queryname.Type queryname.DateLastModified queryname.Attributes queryname.Mode CFERROR variables When generates an error page, the following error cferror variables are available if type="request"...
CFFILE.ServerFileExt CFFILE.ServerFileName CFFILE.TimeCreated CFFILE.TimeLastModified CFFTP error variables When you use the attribute, these cfftp stoponerror variables are populated: CFFTP.Succeeded CFFTP.ErrorCode CFFTP.ErrorText CFFTP ReturnValue variable Some file and directory operations provide a return cfftp value, in the variable CFFTP.ReturnValue. Its value is determined by the results of the attribute.
.ColumnList queryname .Attachments queryname .AttachmentFiles queryname CFQUERY and CFSTOREDPROC variables tag returns information about the query in this cfquery variable: CFQUERY.ExecutionTime tag uses the query name to scope the following cfquery data about the query: queryname.CurrentRow queryname.RecordCount queryname.ColumnList tag returns the following variables: cfstoredproc CFSTOREDPROC.ExecutionTime CFSTOREDPROC.StatusCode...
Client CGI.CERT_ISSUER CGI.CERT_SUBJECT CGI.CLIENT_CERT_ENCODED CGI.HTTP_ACCEPT CGI.HTTP_IF_MODIFIED_SINCE CGI.HTTP_USER_AGENT CERT_ISSUER, CERT_SUBJECT CLIENT_CERT_ENCODED variables are available only when you use client certificates. CGI environment variables When a browser makes a request to a server, the web server and the browser create environment variables. In ColdFusion MX, these variables are referred to as .