Professional Documents
Culture Documents
By Saiful Alam
<body>
<h2 style="color:Green">ArrayNew Function Example</h2>
<body>
<h2 style="color:Crimson">ArrayNew function Example: Two Dimensions</h2>
<cfset ColorArray=Arraynew(2)>
<cfset ColorArray[1][1]="Aquamarine">
<cfset ColorArray[1][2]="##7FFFD4">
<cfset ColorArray[2][1]="Azure">
<cfset ColorArray[2][2]="##F0FFFF">
<cfset ColorArray[3][1]="Beige">
<cfset ColorArray[3][2]="##F5F5DC">
<cfset ColorArray[3][1]="Bisque">
<cfset ColorArray[3][2]="##FFE4C4">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/arraynew-function-example-how-to-
create_2871.html
Example 3
<body>
<h2 style="color:Crimson">ArrayNew function Example: Three
Dimensions</h2>
<cfset ColorArray=Arraynew(3)>
<cfset ColorArray[1][1][1]="1">
<cfset ColorArray[1][1][2]="Red">
<cfset ColorArray[1][1][3]="##FF0000">
<cfset ColorArray[1][2][1]="2">
<cfset ColorArray[1][2][2]="IndianRed">
<cfset ColorArray[1][2][3]="##CD5C5C">
<cfset ColorArray[2][1][1]="1">
<cfset ColorArray[2][1][2]="Green">
<cfset ColorArray[2][1][3]="##008000">
<cfset ColorArray[2][2][1]="2">
<cfset ColorArray[2][2][2]="GreenYellow">
<cfset ColorArray[2][2][3]="##ADFF2F">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/arraynew-function-example-how-to-
create_22.html
Example 4
<body>
<h2 style="color:Green">ArraySwap Function Example</h2>
<br />
<cfset Temp = ArraySwap(ColorArray,1,3)>
<cfdump var="#ColorArray#" label="ColorArray[After Swap Position 1,3]">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/arrayswap-function-example-how-to-swap.html
Example 5
<body>
<h2 style="color:Green">ArraySort Function Example</h2>
<br />
<cfset Temp=ArraySort(ColorArray,"text","asc")>
<cfdump var="#ColorArray#" label="ColorArray[Sorted ascending]">
<br />
<cfset Temp=ArraySort(ColorArray,"text","desc")>
<cfdump var="#ColorArray#" label="ColorArray[Sorted descending]">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/arraysort-function-example-how-to-sort.html
Example 6
<body>
<h2 style="color:Green">ArrayResize Function Example</h2>
<br />
<cfset Temp = ArrayResize(ColorArray,5)>
<cfoutput><b>ColorArray Size[After Resize]:
#ArrayLen(ColorArray)#</b></cfoutput>
<cfdump var="#ColorArray#" label="ColorArray[After Resize]">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/arrayresize-function-example-how-to.html
Example 7
<body>
<h2 style="color:Green">ArrayIsDefined Function Example</h2>
<br />
<cfoutput>
<b>
Element 2 exists?: #ArrayIsDefined(ColorArray,2)#
<br />
Element 3 exists?: #ArrayIsDefined(ColorArray,3)#
</b>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/arrayisdefined-function-example-how-to.html
Example 8
<body>
<h2 style="color:hotpink">ArrayInsertAt Function Example</h2>
<br />
<cfset Temp = ArrayInsertAt(ColorArray,2,"CadetBlue")>
<cfdump var="#ColorArray#" label="Color Array[After insert CadetBlue in
position 2]">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/arrayinsertat-function-example-how-to.html
Example 9
<body>
<h2 style="color:hotpink">ArrayDeleteAt Function Example</h2>
<br />
<cfset Temp = ArrayDeleteAt(NameArray,2)>
<cfdump var="#NameArray#" label="NameArray[After delete position 2]">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/arraydeleteat-function-example-how-to.html
Example 10
<body>
<h2 style="color:HotPink">StructNew Function Example</h2>
<cfset Employee=StructNew()>
<cfset Employee.FirstName="Jenny">
<cfset Employee.LastName="Jones">
<body>
<h2 style="color:HotPink">StructUpdate Function Example</h2>
<cfset Color=StructNew()>
<cfset Color.ID=1>
<cfset Color.Name="LightGray">
<cfset Color.Value="##D3D3D3">
<cfdump var="#Color#" label="Color">
<br />
<cfset Temp=StructUpdate(Color,"Name","LightGreen")>
<cfset Temp=StructUpdate(Color,"Value","##90EE90")>
<cfdump var="#Color#" label="Color[after update]">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/structupdate-function-example-how-to.html
Example 12
<body>
<h2 style="color:HotPink">StructInsert Function Example</h2>
<cfset Color=StructNew()>
<cfdump var="#Color#" label="Color">
<cfset Temp=StructInsert(Color,"ID",1,"yes")>
<cfset Temp=StructInsert(Color,"Name","Green","yes")>
<cfset Temp=StructInsert(Color,"Value","##008000","yes")>
<br />
<cfdump var="#Color#" label="Color[after insert data]">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/structinsert-function-example-how-to.html
Example 13
<body>
<h2 style="color:HotPink">StructFind Function Example</h2>
<cfset Color=StructNew()>
<cfset Color.ID=1>
<cfset Color.Name="LemonChiffon">
<cfset Color.Value="##FFFACD">
<cfdump var="#Color#" label="Color">
<br />
<cfset NameKey=StructFind(Color,"Name")>
<cfoutput>
<b>
Color Structure Name key: #NameKey#
</b>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/structfind-function-example-how-to-get.html
Example 14
<body>
<h2 style="color:HotPink">StructDelete Function Example</h2>
<cfset Color=StructNew()>
<cfset Color.ID=1>
<cfset Color.Name="LawnGreen">
<cfset Color.Value="##7CFC00">
<cfdump var="#Color#" label="Color">
<br />
<cfset Temp=StructDelete(Color,"Value")>
<cfdump var="#Color#" label="Color[after delete value key]">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/structdelete-function-example-how-to.html
Example 15
<body>
<h2 style="color:HotPink">Duplicate Function Example</h2>
<cfset Color=StructNew()>
<cfset Color.ID=1>
<cfset Color.Name="Ivory">
<cfset Color.Value="##FFFFF0">
<cfdump var="#Color#" label="Color">
<br />
<cfset DuplicateColor=Duplicate(Color)>
<cfdump var="#DuplicateColor#" label="DuplicateColor">
<br />
<b>Change the Color structure---</b>
<br /><br />
<cfset Color.Name="Lavender">
<cfset Color.Value="##E6E6FA">
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/duplicate-function-example-how-to.html
Example 16
<body>
<h2 style="color:hotpink">ListChangeDelims Function Example</h2>
<cfset ColorList="DarkRed,DarkSalmon,DarkSeaGreen">
<cfoutput><b>ColorList: #Colorlist#</b></cfoutput>
<br />
<cfset Temp = ListChangeDelims(ColorList,";",",")>
<cfoutput><b>Temp[New Delimiter ;]: #Temp#</b></cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/listchangedelims-function-example-how.html
Example 17
<body>
<h2 style="color:hotpink">ListDeleteAt Function Example</h2>
<cfset ColorList="DarkSlateBlue,DarkSlateGray,DarkTurquoise">
<cfoutput><b>ColorList: #ColorList#</b></cfoutput>
<body>
<h2 style="color:hotpink">ListFind Function Example: Case-sensitive</h2>
<cfset ColorList="DarkViolet,DeepPink,DarkViolet,DeepSkyBlue">
<cfoutput><b>ColorList: #ColorList#</b></cfoutput>
<br /><br />
<td><cfoutput>#ListFind(ColorList,"DeepSkyBlue",",")#</cfoutput></td>
</tr>
</table>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/listfind-function-example-how-to-find.html
Example 19
<body>
<h2 style="color:hotpink">ListGetAt Function Example</h2>
<cfset ColorList="FloralWhite,ForestGreen,Fuchsia,Gainsboro">
<cfoutput><b>ColorList: #ColorList#</b></cfoutput>
<body>
<h2 style="color:hotpink">ListInsertAt Function Example</h2>
<cfset ColorList="GhostWhite,GoldenRod,Gray">
<cfoutput><b>ColorList: #ColorList#</b></cfoutput>
<body>
<h2 style="color:hotpink">ListRest Function Example</h2>
<cfset TagList="cfinterface,cfscript,cferror">
<cfoutput><b>TagList: #TagList#</b></cfoutput>
<body>
<h2 style="color:hotpink">ListSort Function Example</h2>
<cfset TagList="cfexchangemail,cffeed,cfapplication">
<cfoutput><b>TagList: #TagList#</b></cfoutput>
<body>
<h2 style="color:Crimson">Hash Function Example: MD5</h2>
<body>
<h2 style="color:hotpink">CreateDate Function Example</h2>
<cfset Year="1971">
<cfset Month="12">
<cfset Day="16">
<cfset CreatedDate=CreateDate(Year,Month,Day)>
<cfoutput>
<b>
Year: #Year#
<br />
Month: #Month#
<br />
Day: #Day#
<br /><br />
Created Date: #CreatedDate#
<br />
Created Date: #DateFormat(CreatedDate)#
</b>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/createdate-function-example-how-to.html
Example 25
<body>
<h2 style="color:hotpink">CreateDateTime Function Example</h2>
<cfset Year="2008">
<cfset Month="12">
<cfset Day="5">
<cfset Hour="6">
<cfset Minute="30">
<cfset Second="29">
<cfset CreatedDateTime=CreateDateTime(Year,Month,Day,Hour,Minute,Second)>
<cfoutput>
<b>
Year: #Year#
<br />
Month: #Month#
<br />
Day: #Day#
<br />
Hour: #Hour#
<br />
Minute: #Minute#
<br />
Second: #Second#
<br /><br />
Created DateTime: #CreatedDateTime#
</b>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/createdatetime-function-example-how-to.html
Example 26
<body>
<h2 style="color:hotpink">CreateTimeSpan Function Example</h2>
<cfdump var="#Employee#">
<br />
<b>Query result catched for 30 minute TimeSpan</b>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/createtimespan-function-example-how-to.html
Example 27
<body>
<h2 style="color:hotpink">DateAdd Function Example</h2>
<cfset MyDateTime=Now()>
<cfoutput>
<b>
MyDateTime: #MyDateTime#
<br />
MyDateTime: #DateFormat(MyDateTime)#
</b>
<br /><br />
</cfoutput>
<td><cfoutput>#DateFormat(DateAdd("yyyy",1,MyDateTime))#</cfoutput></td>
</tr>
<tr>
<td>#DateFormat(DateAdd("q",1,MyDateTime))#</td>
<td>Quarter</td>
<td><cfoutput>#DateFormat(DateAdd("q",1,MyDateTime))#</cfoutput></td>
</tr>
<tr>
<td>#DateFormat(DateAdd("m",1,MyDateTime))#</td>
<td>Month</td>
<td><cfoutput>#DateFormat(DateAdd("m",1,MyDateTime))#</cfoutput></td>
</tr>
<tr>
<td>#DateFormat(DateAdd("y",1,MyDateTime))#</td>
<td>Day of year</td>
<td><cfoutput>#DateFormat(DateAdd("y",1,MyDateTime))#</cfoutput></td>
</tr>
<tr>
<td>#DateFormat(DateAdd("w",2,MyDateTime))#</td>
<td>Weekday</td>
<td><cfoutput>#DateFormat(DateAdd("w",2,MyDateTime))#</cfoutput></td>
</tr>
<tr>
<td>#DateFormat(DateAdd("ww",1,MyDateTime))#</td>
<td>Week</td>
<td><cfoutput>#DateFormat(DateAdd("ww",1,MyDateTime))#</cfoutput></td>
</tr>
<tr>
<td>#DateAdd("h",1,MyDateTime)#</td>
<td>Hour</td>
<td><cfoutput>#DateAdd("h",1,MyDateTime)#</cfoutput></td>
</tr>
<tr>
<td>#DateAdd("n",1,MyDateTime)#</td>
<td>Minute</td>
<td><cfoutput>#DateAdd("n",1,MyDateTime)#</cfoutput></td>
</tr>
<tr>
<td>#DateAdd("s",10,MyDateTime)#</td>
<td>Second</td>
<td><cfoutput>#DateAdd("s",10,MyDateTime)#</cfoutput></td>
</tr>
</table>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/dateadd-function-example-how-to-add.html
Example 28
<body>
<h2 style="color:hotpink">DateCompare Function Example</h2>
<cfset MyDate="3-Dec-2008">
<cfset MyAnotherDate="5-Dec-2008">
<cfoutput>
<b>
MyDate: #MyDate#
<br />
MyAnotherDate: #MyAnotherDate#
</b><br />
</cfoutput>
<cfset DateCompareResult=DateCompare(myDate,MyAnotherDate)>
<cfif DateCompareResult EQ 0>
Two date is same
<cfelseif DateCompareResult LT 0>
MyDate is earlier than MyAnotherDate
<cfelse>
MyDate is later than MyAnotherDate
</cfif>
<body>
<h2 style="color:hotpink">DateDiff Function Example</h2>
<cfset MyDate="8-Dec-2006">
<cfset MyAnotherDate="10-Dec-2007">
<cfoutput>
<b>
MyDate: #MyDate#
<br />
MyAnotherDate: #MyAnotherDate#
<br /><br />
</b>
</cfoutput>
<table style="color:LightGreen; background:Green;" border="1"
bordercolor="DarkGreen">
<tr>
<td style="font-weight:bold">DateDiff</td>
<td style="font-weight:bold">DatePart</td>
<td style="font-weight:bold">Output</td>
</tr>
<tr>
<td>#DateDiff("yyyy",MyDate,MyAnotherDate)#</td>
<td>Years</td>
<td><cfoutput>#DateDiff("yyyy",MyDate,MyAnotherDate)#</cfoutput></td>
</tr>
<tr>
<td>#DateDiff("q",MyDate,MyAnotherDate)#</td>
<td>Quarters</td>
<td><cfoutput>#DateDiff("q",MyDate,MyAnotherDate)#</cfoutput></td>
</tr>
<tr>
<td>#DateDiff("m",MyDate,MyAnotherDate)#</td>
<td>Months</td>
<td><cfoutput>#DateDiff("m",MyDate,MyAnotherDate)#</cfoutput></td>
</tr>
<tr>
<td>#DateDiff("d",MyDate,MyAnotherDate)#</td>
<td>Days</td>
<td><cfoutput>#DateDiff("d",MyDate,MyAnotherDate)#</cfoutput></td>
</tr>
</table>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/datediff-function-example-how-to-get.html
Example 30
<body>
<h2 style="color:hotpink">DatePart Function Example</h2>
<cfset MyDate=Now()>
<cfoutput>
<b>
MyDate: #MyDate#
<br /><br />
</b>
</cfoutput>
<table style="color:LightGreen; background:Green;" border="1"
bordercolor="DarkGreen">
<tr>
<td style="font-weight:bold">DatePart</td>
<td style="font-weight:bold"></td>
<td style="font-weight:bold">Output</td>
</tr>
<tr>
<td>#DatePart("yyyy",MyDate)#</td>
<td>Years</td>
<td><cfoutput>#DatePart("yyyy",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("q",MyDate)#</td>
<td>Quarter</td>
<td><cfoutput>#DatePart("q",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("m",MyDate)#</td>
<td>Month</td>
<td><cfoutput>#DatePart("m",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("y",MyDate)#</td>
<td>Day of Year</td>
<td><cfoutput>#DatePart("y",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("w",MyDate)#</td>
<td>Weekday</td>
<td><cfoutput>#DatePart("w",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("ww",MyDate)#</td>
<td>Week</td>
<td><cfoutput>#DatePart("ww",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("yyyy",MyDate)#</td>
<td>Years</td>
<td><cfoutput>#DatePart("yyyy",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("h",MyDate)#</td>
<td>Hour</td>
<td><cfoutput>#DatePart("h",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("n",MyDate)#</td>
<td>Minute</td>
<td><cfoutput>#DatePart("n",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("s",MyDate)#</td>
<td>Second</td>
<td><cfoutput>#DatePart("s",MyDate)#</cfoutput></td>
</tr>
<tr>
<td>#DatePart("l",MyDate)#</td>
<td>Millisecond</td>
<td><cfoutput>#DatePart("l",MyDate)#</cfoutput></td>
</tr>
</table>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/datepart-function-example-how-to-get.html
Example 31
<body>
<h2 style="color:hotpink">GetTickCount Function Example</h2>
<cfset StartTick=GetTickCount()>
<cfoutput><b>StartTick: #StartTick#</b></cfoutput>
<br /><br />
Loop start...[1-1000000]
<br />
<cfloop index="i" from="1" to="1000000" step="1">
</cfloop>
Loop end...
<br /><br />
<cfset EndTick=GetTickCount()>
<cfoutput><b>EndTick: #EndTick#</b></cfoutput>
<br /><br />
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/gettickcount-function-example-how-to.html
Example 32
<body>
<h2 style="color:Crimson">DE Function Example</h2>
<body>
<h2 style="color:Crimson">SetVariable Function Example</h2>
<cfset MyID=5>
<cfset Setvariable("ID" & MyID,"Jones" )>
<cfset SetVariable("City","Rome")>
<cfoutput>
<b>ID5:</b> #ID5#
<br />
<b>City:</b> #City#
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/setvariable-function-example-how-to-set.html
Example 34
<body>
<h2 style="color:Crimson">WriteOutput Function Example</h2>
<cfscript>
Value1=10;
value2=15;
Value3=25;
Sum=Value1+Value2+Value3;
WriteOutput("<b>Value1</b>" & "=" & Value1 & "<br/>");
WriteOutput("<b>Value2</b>" & "=" & Value2 & "<br/>");
WriteOutput("<b>Value3</b>" & "=" & Value3 & "<br/>");
WriteOutput("<b>Value1+Value2+Value3</b>= "& Sum);
</cfscript>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/writeoutput-function-example-how-to.html
Example 35
<body>
<h2 style="color:HotPink">QueryNew Function Example</h2>
<cfset Temp=QueryAddRow(qEmployee,1)>
<cfset Temp=QuerySetCell(qEmployee,"EmployeeID",1,1)>
<cfset Temp=QuerySetCell(qEmployee,"FirstName","Jenny",1)>
<cfset Temp=QuerySetCell(qEmployee,"LastName","Jones",1)>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/querynew-function-example-how-to-create.html
Example 36
<body>
<h2 style="color:hotpink">Find Function Example [Case sensitive]</h2>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/find-function-example-how-to-find-first.html
Example 37
<body>
<h2 style="color:HotPink">RemoveChars Function Example</h2>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/removechars-function-example-how-to.html
Example 38
<body>
<h2 style="color:HotPink">Replace Function Example [case sensitive]</h2>
</b>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/replace-function-example-how-to-replace.html
Example 39
<body>
<h2 style="color:Crimson">GetMetricData Function Example</h2>
<cfset MetricDataPERF=GetMetricData("perf_monitor")>
<cfdump var="#MetricDataPERF#" label="Metric Data[perf_monitor]">
<cfset MetricDataSimpleLoad=GetMetricData("simple_load")>
<cfset MetricDataPreviousReqTime=GetMetricData("prev_req_time")>
<cfset MetricDataAvgReqTime=GetMetricData("avg_req_time")>
<cfoutput>
<b>MetricData Simple Load[simple_load]:</b> #MetricDataSimpleLoad#
<br />
<b>MetricData Previuos Request Time[prev_req_time]:</b>
#MetricDataPreviousReqTime#
<br />
<b>MetricData Avarage Request Time[avg_req_time]:</b>
#MetricDataAvgReqTime#
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/getmetricdata-function-example-how-to.html
Example 40
<body>
<h2 style="color:Crimson">ImageNew Function Example</h2>
<cfset TestImage=ImageNew("",250,250,"rgb","red")>
<cfset ImageDrawText(TestImage,"A New Image",75,25)>
<cfimage action="WriteToBrowser" source="#TestImage#">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/imagenew-function-example-how-to-create.html
Example 41
<body>
<h2 style="color:Crimson">cfargument Tag Example</h2>
<cfoutput>
<b>Book Title [BookID 1]:</b> #GetBookTitleByID(1)#
<br />
<b>Book Title [BookID 10]:</b> #GetBookTitleByID(10)#
<br />
<b>Book Title [BookID 15]:</b> #GetBookTitleByID(15)#
<br />
<b>Book Title [BookID 20]:</b> #GetBookTitleByID(20)#
</cfoutput>
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfcalendar tag example:
how to use monthnames attribute</h2>
<hr width="575" align="left" color="CornFlowerBlue" />
<br />
<cfif IsDefined("Form.SubmitNextMeetingDate")>
<cfoutput>
<h3 style="color:OrangeRed;">
Next Meeting Date Is: #DateFormat(Form.MeetingDate)#
</h3>
</cfoutput>
</cfif>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfcalendar-tag-how-to-set-change-month.html
Example 43
<body>
<h2 style="color:SeaGreen; font-style:italic">cfcalendar tag example: how
to use firstdayofweek attribute</h2>
<hr width="575" align="left" color="SeaGreen" />
<br />
<cfif IsDefined("Form.SubmitJoiningDate")>
<cfoutput>
<h3 style="color:IndianRed;">
Your joining date is: #DateFormat(Form.JoiningDate)#
</h3>
</cfoutput>
</cfif>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfcalendar-tag-how-to-set-change-first.html
Example 44
<body>
<h2 style="color:SeaGreen; font-style:italic">cfcalendar tag example: how
to use daynames attribute</h2>
<hr width="575" align="left" color="OrangeRed" />
<br />
<cfif IsDefined("Form.SubmitArrivalDate")>
<cfoutput>
<h3 style="color:OrangeRed;">
Your arrival date is: #DateFormat(Form.ArrivalDate)#
</h3>
</cfoutput>
</cfif>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfcalendar-tag-how-to-set-change-day.html
Example 45
<body>
<h2 style="color:OliveDrab; font-style:italic">cfcalendar tag example:
how to use startrange, endrange attribute</h2>
<hr width="625" align="left" color="Olive" />
<br />
<cfif IsDefined("Form.SubmitClassDate")>
<cfoutput>
<h3 style="color:DarkSeaGreen;">
Next Class Date Is: #DateFormat(Form.ClassDate)#
</h3>
</cfoutput>
</cfif>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfcalendar-tag-how-to-disable-date.html
Example 46
<body>
<h2 style="color:BlueViolet; font-style:italic">cfchart example: pie type
chart</h2>
<hr width="675" align="left" color="BlueViolet" />
<br />
<cfchart
format="jpg"
chartheight="375"
databackgroundcolor="FFE4E1"
chartwidth="675"
backgroundcolor="EEE8AA"
fontbold="yes"
foregroundcolor="FF4500"
fontsize="13"
show3d="yes"
font="Comic Sans MS"
showborder="no"
pieslicestyle="sliced"
>
<cfchartseries
type="pie"
>
<cfchartdata item="Sam" value="1250">
<cfchartdata item="Ray" value="1750">
<cfchartdata item="Sonia" value="2150">
<cfchartdata item="Suzon" value="850">
<cfchartdata item="Taz" value="950">
</cfchartseries>
</cfchart>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfchart-tag-how-to-create-and-
design_3917.html
Example 47
<body>
<h2 style="color:MediumAquaMarine; font-style:italic">cfchart example:
how to use cfchart without query</h2>
<hr width="700" align="left" color="LightPink" />
<br />
<cfchart
format="png"
xaxistitle="First Name"
yaxistitle="Salary"
chartheight="400"
chartwidth="700"
backgroundcolor="D8BFD8"
foregroundcolor="FFFAFA"
fontbold="yes"
show3d="yes"
databackgroundcolor="FFEBCD"
font="Verdana"
fontsize="13"
showxgridlines="no"
showygridlines="yes"
sortxaxis="yes"
showborder="no"
>
<cfchartseries
type="bar"
seriescolor="FF6347"
>
<cfchartdata item="Jen" value="1200">
<cfchartdata item="Jhon" value="1500">
<cfchartdata item="Bill" value="1800">
<cfchartdata item="Ben" value="2000">
<cfchartdata item="Sonia" value="900">
</cfchartseries>
</cfchart>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfchart-tag-how-to-use-cfchart-without.html
Example 48
<body>
<h2 style="color:DarkOliveGreen; font-style:italic">cfchart example: how
to use colorlist in pie chart</h2>
<hr width="700" align="left" color="LightPink" />
<br />
<cfchart
format="png"
xaxistitle="First Name"
yaxistitle="Salary"
chartheight="400"
chartwidth="700"
showlegend="yes"
fontbold="yes"
backgroundcolor="BC8F8F"
foregroundcolor="FFFAFA"
show3d="yes"
databackgroundcolor="8FBC8F"
font="Verdana"
fontsize="13"
showxgridlines="no"
showygridlines="yes"
>
<cfchartseries
query="qEmployee"
type="pie"
colorlist="FFE4E1,FFEFD5,D2B48C,FFDAB9,F5DEB3"
itemcolumn="FirstName"
valuecolumn="Salary"
>
</cfchartseries>
</cfchart>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfchart-tag-how-to-use-colorlist-in-pie.html
Example 49
<body>
<h2 style="color:GoldenRod; font-style:italic">cfchart example: how to
use xoffset and yoffset in chart</h2>
<hr width="700" align="left" color="LightPink" />
<br />
<cfchart
format="png"
xaxistitle="First Name"
yaxistitle="Salary"
chartheight="400"
chartwidth="700"
showlegend="no"
backgroundcolor="808080"
foregroundcolor="FFFAFA"
fontbold="yes"
show3d="yes"
databackgroundcolor="D2B48C"
font="Verdana"
fontsize="13"
showxgridlines="no"
showygridlines="yes"
xoffset="0.3"
yoffset="0.2"
>
<cfchartseries
query="qEmployee"
type="bar"
itemcolumn="FirstName"
valuecolumn="Salary"
seriescolor="F5DEB3"
>
</cfchartseries>
</cfchart>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfchart-tag-how-to-use-xoffset-and.html
Example 50
<body>
<h2 style="color:SlateGray; font-style:italic">cfchartdata example: how
to use</h2>
<hr width="700" align="left" color="SlateGray" />
<br />
<cfchart
format="jpg"
xaxistitle="First Name"
yaxistitle="Salary"
chartheight="400"
chartwidth="700"
fontbold="yes"
backgroundcolor="DEB887"
foregroundcolor="FFFFFF"
show3d="yes"
databackgroundcolor="FFFAFA"
fontsize="13"
>
<cfchartseries
query="qEmployee"
type="cone"
itemcolumn="FirstName"
valuecolumn="Salary"
seriescolor="9ACD32"
>
<cfchartdata item="Test" value="150000">
</cfchartseries>
</cfchart>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfchartdata-tag-how-to-use-cfchartdata.html
Example 51
<body>
<h2 style="color:Crimson; font-style:italic">cfchart example: how to use
3d chart</h2>
<hr width="700" align="left" color="LightPink" />
<br />
<cfchart
format="png"
xaxistitle="First Name"
chartheight="400"
chartwidth="700"
yaxistitle="Salary"
showlegend="no"
backgroundcolor="E9967A"
labelformat="currency"
foregroundcolor="FFFAFA"
fontbold="yes"
show3d="yes"
databackgroundcolor="FF4500"
font="Verdana"
fontsize="13"
showxgridlines="no"
showygridlines="yes"
>
<cfchartseries
query="qEmployee"
type="curve"
itemcolumn="FirstName"
valuecolumn="Salary"
>
</cfchartseries>
</cfchart>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfchart-tag-how-to-use-3d-chart-in.html
Example 52
<body>
<h2 style="color:DimGray; font-style:italic">cfchart example: how to
use</h2>
<hr width="700" align="left" color="DimGray" />
<br />
<cfchart
format="jpg"
xaxistitle="First Name"
yaxistitle="Salary"
chartheight="400"
chartwidth="700"
backgroundcolor="708090"
foregroundcolor="F5F5F5"
fontbold="yes"
fontitalic="yes"
font="Verdana"
fontsize="13"
show3d="yes"
labelformat="currency"
showxgridlines="no"
>
<cfchartseries
query="qEmployee"
type="bar"
itemcolumn="FirstName"
valuecolumn="Salary"
seriescolor="D8BFD8"
>
</cfchartseries>
</cfchart>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfchart-tag-how-to-create-chart-and-use.html
Example 53
<body>
<h2 style="color:DodgerBlue">ColdFusion cfdirectory tag example:
Create</h2>
<cfset CurrentDirectory=GetTemplatePath()>
<cfset CurrentDirectory =
ListDeleteAt(CurrentDirectory,ListLen(CurrentDirectory,"/\"),"/\")>
<cfset NewDirectory="#CurrentDirectory#\TestFolder">
<cfoutput>
<b>Current Directory:</b> #CurrentDirectory#
<br />
<b>New Directory:</b> #NewDirectory#
</cfoutput>
<body>
<h2 style="color:DodgerBlue">ColdFusion cfdirectory tag example:
List</h2>
<cfset CurrentDirectory=GetTemplatePath()>
<cfset CurrentDirectory =
ListDeleteAt(CurrentDirectory,ListLen(CurrentDirectory,"/\"),"/\")>
<cfoutput>
<b>Current Directory:</b> #CurrentDirectory#
<br />
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/02/cfdirectory-tag-how-to-get-file-and.html
Example 55
<body>
<h2 style="color:DodgerBlue">cfdirectory example: Specific Extension
File List</h2>
<cfset RootDirectory=GetTemplatePath()>
<cfset RootDirectory =
ListDeleteAt(RootDirectory,ListLen(RootDirectory,"/\"),"/\")>
<cfoutput>
<b>Root Directory:</b> #RootDirectory#
<br />
</cfoutput>
<cfdirectory
action="list"
directory="#RootDirectory#"
name="result" filter="*.cfm"
>
<cfdump var="#result#">
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cfdirectory-tag-how-to-get-specific.html
Example 56
<body>
<cfdocument format="flashpaper">
<h2 style="color:Crimson; font-style:italic">
cfdocument example: employee data
</h2>
<cftable query="qEmployee" colheaders="yes" htmltable="no" border="yes">
<cfcol header="ID" text="#Emp_ID#">
<cfcol header="First Name" text="#FirstName#">
<cfcol header="Last Name" text="#LastName#">
<cfcol header="Salary" text="#Salary#">
</cftable>
</cfdocument>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdocument-tag-how-to-create-printable.html
Example 57
<body>
<cfdocument format="pdf">
<cfoutput>
<cfdocumentitem type="header">
Current Page Number: #cfdocument.currentpagenumber#
</cfdocumentitem>
<cfdocumentsection>
<h3 style="color:Crimson; font-style:italic">
cfdocument scope example: currentpagenumber
</h3>
<cftable query="qEmployee" colheaders="yes" htmltable="no"
border="no">
<cfcol header="ID" text="#Emp_ID#">
<cfcol header="First Name" text="#FirstName#">
<cfcol header="Last Name" text="#LastName#">
<cfcol header="Salary" text="#Salary#">
</cftable>
<cfdocumentitem type="pagebreak">
</cfdocumentitem>
<h3 style="color:DimGray; font-style:italic">
This is another page
</h3>
</cfdocumentsection>
</cfoutput>
</cfdocument>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdocument-scope-currentpagenumber-how.html
Example 58
<body>
<cfdocument format="pdf">
<cfoutput>
<cfdocumentitem type="header">
Current Section Page Number:
#cfdocument.currentsectionpagenumber#
</cfdocumentitem>
<cfdocumentsection>
<h3 style="color:DodgerBlue; font-style:italic">
cfdocument scope example: currentsectionpagenumber
</h3>
<cfdocumentsection>
<h3 style="color:Crimson; font-style:italic">
This is a new section.
</h3>
</cfdocumentsection>
</cfoutput>
</cfdocument>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdocument-scope-currentsectionpagenumb.html
Example 59
<body>
<cfdocument format="pdf">
<cfoutput>
<cfdocumentitem type="header">
Page Header <br />Current Page Number:
#cfdocument.currentpagenumber#
</cfdocumentitem>
<cfdocumentsection>
<h4 style="color:Crimson; font-style:italic">
cfdocument example: display document header
</h4>
<cftable query="qCenters" colheaders="yes" htmltable="no"
border="no">
<cfcol header="Center ID" text="#Center_ID#">
<cfcol header="Center Name" text="#Name#">
</cftable>
<cfdocumentitem type="pagebreak">
</cfdocumentitem>
<h3 style="color:DimGray; font-style:italic">
This is another page
</h3>
</cfdocumentsection>
</cfoutput>
</cfdocument>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdocument-tag-how-to-show-header-in.html
Example 60
<body>
<cfdocument format="pdf">
<cfoutput>
<cfdocumentitem type="header">
This isPage Header <br />
Total Page Count: #cfdocument.totalpagecount#
</cfdocumentitem>
<cfdocumentsection>
<h3 style="color:Crimson; font-style:italic">
cfdocument example: using page break
</h3>
<cftable query="qParks" colheaders="yes" htmltable="no"
border="no">
<cfcol header="Park Name" text="#ParkName#">
<cfcol header="City" text="#City#">
</cftable>
<cfdocumentitem type="pagebreak">
</cfdocumentitem>
<h3 style="color:DimGray; font-style:italic">
This is another page
</h3>
</cfdocumentsection>
</cfoutput>
</cfdocument>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdocument-tag-how-to-use-pagebreak.html
Example 61
<body>
<cfdocument format="pdf">
<cfoutput>
<cfdocumentitem type="header">
Total Page Count: #cfdocument.totalpagecount#
</cfdocumentitem>
<cfdocumentsection>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdocument-scope-totalpagecount-how-to.html
Example 62
<body>
<cfdocument format="pdf">
<cfoutput>
<cfdocumentitem type="header">
Total Section Page Count: #cfdocument.totalsectionpagecount#
</cfdocumentitem>
<cfdocumentsection>
<h3 style="color:RosyBrown; font-style:italic">
cfdocument scope example: totalsectionpagecount
</h3>
<cfdocumentsection>
<h3 style="color:SaddleBrown; font-style:italic">
This is a new section
</h3>
</cfdocumentsection>
</cfoutput>
</cfdocument>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdocument-scope-totalsectionpagecount.html
Example 63
<body>
<cfhttp url="http://www.gmail.com/" resolveurl="yes">
<cfdocument format="pdf">
<cfoutput>
#cfhttp.FileContent#
</cfoutput>
</cfdocument>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdocument-and-cfhttp-tag-how-to.html
Example 64
<body>
<cfdocument format="pdf">
<cfoutput>
<cfdocumentitem type="footer">
Page Footer <br />Current Page Number:
#cfdocument.currentpagenumber#
</cfdocumentitem>
<cfdocumentsection>
<h4 style="color:DarkCyan; font-style:italic">
cfdocument example: display document footer
</h4>
<cftable query="qCenters" colheaders="yes" htmltable="no"
border="no">
<cfcol header="Center ID" text="#Center_ID#">
<cfcol header="Center Name" text="#Name#">
<cfcol header="City" text="#City#">
</cftable>
<cfdocumentitem type="pagebreak">
</cfdocumentitem>
<h3 style="color:DimGray; font-style:italic">
This is a new page
</h3>
</cfdocumentsection>
</cfoutput>
</cfdocument>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdocument-tag-how-to-show-footer-in.html
Example 65
<body>
<cfdocument
format="pdf"
encryption="128-bit"
permissions="allowprinting"
userpassword="jenny"
ownerpassword="jones"
>
<cfoutput>
<cfdocumentitem type="header">
Current Page Number: #cfdocument.currentpagenumber#
</cfdocumentitem>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/how-to-use-encryption-permissions.html
Example 66
<body>
<body>
<h2 style="color:OrangeRed; font-style:italic">cfdump tag example: how to
use metainfo attribute</h2>
<hr width="500" align="left" color="CadetBlue" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdump-tag-how-to-use-metainfo.html
Example 68
cfdump tag: how to use hide attribute in cfdump for hide query
columns
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfdump tag: how to use hide attribute in cfdump for hide query
columns</title>
</head>
<body>
<h2 style="color:DarkMagenta; font-style:italic">cfdump tag example: how
to hide query columns</h2>
<hr width="500" align="left" color="CadetBlue" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdump-tag-how-to-use-hide-attribute-in.html
Example 69
<body>
<h2 style="color:Crimson; font-style:italic">cfdump tag example: how to
hide structure keys</h2>
<hr width="500" align="left" color="CadetBlue" />
<br />
<cfset Color=StructNew()>
<cfset Color.ID=1>
<cfset Color.Name="Bisque">
<cfset Color.Value="##FFE4C4">
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdump-tag-how-to-use-hide-attribute-
in_24.html
Example 70
<body>
<h2 style="color:OrangeRed; font-style:italic">cfdump tag example: how to
get output in a file or browser</h2>
<hr width="575" align="left" color="CadetBlue" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdump-tag-how-to-get-output-in-file-or.html
Example 71
cfdump tag: how to use top attribute for show specific number
of rows in query
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfdump tag: how to use top attribute for show specific number of
rows in query</title>
</head>
<body>
<h2 style="color:PaleVioletRed; font-style:italic">cfdump tag example:
show specific number of rows in query</h2>
<hr width="600" align="left" color="CadetBlue" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdump-tag-how-to-use-top-attribute-for.html
Example 72
<body>
<h2 style="color:Green; font-style:italic">cfdump tag example: show
specific columns in query output</h2>
<hr width="575" align="left" color="CadetBlue" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdump-tag-how-to-show-specific-columns.html
Example 73
<body>
<h2 style="color:Olive; font-style:italic">cfdump tag example: show
specific keys in structure output</h2>
<hr width="600" align="left" color="CadetBlue" />
<br />
<cfset Color=StructNew()>
<cfset Color.ID=3>
<cfset Color.Name="NavajoWhite">
<cfset Color.Value="##FFDEAD">
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdump-tag-how-to-show-specific-keys-in.html
Example 74
<body>
<h2 style="color:Red; font-style:italic">cfdump tag example: show number
of nested levels in structure</h2>
<hr width="625" align="left" color="CadetBlue" />
<br />
<cfset Employee=StructNew()>
<cfset Employee.ID=1>
<cfset Employee.Name.FirstName="Jenny">
<cfset Employee.Name.LastName="Jones">
<cfset Employee.City="Rome">
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cfdump-tag-how-to-show-number-of-nested.html
Example 75
<body>
<h2 style="color:DarkBlue; font-style:italic">coldfusion cfdump var
expression: how to use</h2>
<hr width="450" align="left" color="LightBlue" />
<br />
<cfset Number1=5>
<cfset Number2=10>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/cfdump-var-expression-how-to-use.html
Example 76
<body>
<h2 style="color:DodgerBlue">ColdFusion cffile tag example: Copy</h2>
<cfset SourceFile="C:\Test.txt">
<cfset Destination="C:\TestFolder\Test.txt">
<cfoutput>
<cfif FileExists(SourceFile)>
Source File Exists: #SourceFile#
<br />
Destination: #Destination#
<cffile action="copy" source="#SourceFile#"
destination="#Destination#">
<br />
file copy to desination successfully!
<cfelse>
Source File not Exists: #SourceFile#
</cfif>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cffile-tag-how-to-copy-file.html
Example 77
<body>
<h2 style="color:DodgerBlue">ColdFusion cffile tag example: Delete</h2>
<cfset SourceFile="C:\Test1.txt">
<cfoutput>
<cfif FileExists(SourceFile)>
File Exists: #SourceFile#
<cffile action="delete" file="#SourceFile#">
<br />
file deleted successfully!
<cfelse>
File not Exists: #SourceFile#
</cfif>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cffile-tag-how-to-delete-file.html
Example 78
<body>
<h2 style="color:DodgerBlue">ColdFusion cffile tag example: Move</h2>
<cfset SourceFile="C:\Test2.txt">
<cfset Destination="C:\TestFolder\Test2.txt">
<cfoutput>
<cfif FileExists(SourceFile)>
Source File Exists: #SourceFile#
<br />
Destination: #Destination#
<cffile action="move" source="#SourceFile#"
destination="#Destination#">
<br />
file moved to desination successfully!
<cfelse>
Source File not Exists: #SourceFile#
</cfif>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cffile-tag-how-to-move-file.html
Example 79
<body>
<h2 style="color:DodgerBlue">ColdFusion cffile tag example: Read</h2>
<cfset SourceFile="C:\Test3.txt">
<cfoutput>
<cfif FileExists(SourceFile)>
File Exists: #SourceFile#
<cffile action="read" file="#SourceFile#" variable="FileContent">
<br /><br />
File read successfully!
<br />
File Content : <b>#FileContent#</b>
<cfelse>
File not Exists: #SourceFile#
</cfif>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cffile-tag-how-to-read-file.html
Example 80
<body>
<h2 style="color:DodgerBlue">ColdFusion cffile tag example: Append</h2>
<cfset MyFile="C:\Test.txt">
<cfoutput>
<cfif FileExists(MyFile)>
File Exists: #MyFile#
<cffile action="append" file="#MyFile#" output="This is a test
line.">
<br />
Text append in this file successfully!
<cfelse>
File not Exists: #MyFile#
</cfif>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cffile-tag-how-to-append-text-to-text.html
Example 81
<body>
<h2 style="color:DodgerBlue">ColdFusion cffile tag example:
readBinary</h2>
<cfset SourceFile="C:\logo.gif">
<cfoutput>
<cfif FileExists(SourceFile)>
File Exists: #SourceFile#
<cffile action="readbinary" file="#SourceFile#"
variable="FileContent">
<br /><br />
File read successfully!
<br />
<cfdump var="#FileContent#">
<cfelse>
File not Exists: #SourceFile#
</cfif>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cffile-tag-how-to-read-binary-file.html
Example 82
<body>
<h2 style="color:DodgerBlue">ColdFusion cffile tag example: Rename</h2>
<cfset SourceFile="C:\Test4.txt">
<cfset Destination="C:\Test5.txt">
<cfoutput>
<cfif FileExists(SourceFile)>
Source File Exists: #SourceFile#
<br />
Destination: #Destination#
<cffile action="rename" source="#SourceFile#"
destination="#Destination#">
<br />
file renamed successfully!
<cfelse>
Source File not Exists: #SourceFile#
</cfif>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cffile-tag-how-to-rename-file.html
Example 83
cffile tag: how to write text to a text file or create new one
<body>
<h2 style="color:DodgerBlue">ColdFusion cffile tag example: Write,
Create</h2>
<cfset MyFile="C:\Test6.txt">
<cfoutput>
File: #MyFile#
<cffile action="write" file="#MyFile#" output="cffile tag example
action write.">
<br />
Text write in file successfully!
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cffile-tag-how-to-write-text-to-text.html
Example 84
<body>
<h2 style="color:DodgerBlue">ColdFusion cffile tag example: Upload</h2>
<cfset UploadFolder="C:\Upload">
<cfif IsDefined("Form.UploadFile") AND Form.UploadFile NEQ "">
<cffile
action="upload"
filefield="UploadFile"
destination="#UploadFolder#"
nameconflict="overwrite"
>
File uploaded successfully!
<br />
Uploaded file: <cfoutput>#cffile.ClientFile#</cfoutput>
<cfelse>
Select a file first!
</cfif>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cffile-tag-how-to-upload-file.html
Example 85
<body>
<h2 style="color:DodgerBlue; font-style:italic">cffile example: Upload
Image</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<cfset UploadFolder="C:\UploadImage">
<body>
<h2 style="color:DodgerBlue">cfform example: Flash Format Form</h2>
<cfif IsDefined("Form.Submit")>
<cfoutput>
Hi <b>#Form.UserName#!</b> You came from <b>#Form.City#</b>
</cfoutput>
</cfif>
<br /><br />
<cfform
name="FlashForm"
method="post"
action=""
format="flash"
width="350"
height="250"
skin="halogreen"
>
<cfformgroup type="panel" label="User Details">
<cfinput type="text" name="UserName" label="User Name"
required="yes" message="Name Required">
<cfinput type="text" name="City" label="City" required="yes"
message="City Required">
<cfinput type="submit" name="Submit" value="Submit">
</cfformgroup>
</cfform>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cfform-tag-how-to-use-flash-format-form.html
Example 87
<body>
<h2 style="color:DodgerBlue">cfform example: Flash Format Form and
cfformgroup</h2>
<cfif IsDefined("Form.Submit")>
<cfoutput>
Hi <b>#Form.UserName#!</b> You came from <b>#Form.City#</b>
<br />
Your Group Name: <b>#Form.UserGroup#</b> and Member ID:
<b>#Form.memberID#</b>
</cfoutput>
</cfif>
<br /><br />
<cfform
name="FlashFormatForm"
method="post"
action=""
format="flash"
width="500"
height="350"
skin="haloorange"
>
<cfformgroup type="panel" label="Member Details">
<cfformgroup type="hdividedbox">
<cfformgroup type="vbox">
<cfinput type="text" name="UserName" label="User Name"
required="yes" message="Name Required">
<cfinput type="text" name="City" label="City"
required="yes" message="City Required">
</cfformgroup>
<cfformgroup type="vbox">
<cfinput type="text" name="UserGroup" label="User Group"
required="yes" message="Group Name Required">
<cfinput type="text" name="MemberID" label="Member ID"
required="yes" message="Member ID Required">
</cfformgroup>
</cfformgroup>
<cfinput type="submit" name="Submit" value="Submit">
</cfformgroup>
</cfform>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cfform-tag-how-to-use-flash-format-
form_03.html
Example 88
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfform example:
preservedata property</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<br />
<h4 style="color:#F30;">
<cfif IsDefined("Form.Submit")>
<cfoutput>
Your name: #Form.Name#
<br />
Address: #Form.Address#
</cfoutput>
</cfif>
</h4>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cffrom-preservedata-property-how-to.html
Example 89
<body>
<h2 style="color:DodgerBlue">cfformgroup example: Flash Format Form and
Accordion</h2>
<cfif IsDefined("Form.Submit")>
<cfoutput>
Country: <b>#Form.Country#</b>
<br />
City: <b>#Form.City#</b>
</cfoutput>
</cfif>
<br /><br />
<cfform
name="FlashFormAccordion"
method="post"
action=""
format="flash"
width="500"
height="250"
skin="halosilver"
>
<cfformgroup type="panel" label="User Address">
<cfformgroup type="accordion">
<cfformgroup type="page" label="Country">
<cfinput type="text" name="Country" label="Country"
required="yes" message="Country Required">
</cfformgroup>
<cfformgroup type="page" label="City">
<cfinput type="text" name="City" label="City"
required="yes" message="City Required">
</cfformgroup>
</cfformgroup>
<cfinput type="submit" name="Submit" value="Submit Details">
</cfformgroup>
</cfform>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cfformgroup-tag-how-to-use-accordion.html
Example 90
<body>
<h2 style="color:DodgerBlue">cfformgroup example: Flash Format Form and
Panel</h2>
<cfif IsDefined("Form.Submit")>
<cfoutput>
Name: <b>#Form.Name#!</b>
<br />
Address: <b>#Address#</b>
</cfoutput>
</cfif>
<br /><br />
<cfform
name="FlashPanelForm"
method="post"
action=""
format="flash"
width="500"
height="350"
skin="haloblue"
>
<cfformgroup type="panel" label="Guest Details">
<cfinput type="text" name="Name" label="Name" required="yes"
message="Name Required">
<cfinput type="text" name="Address" label="Address"
required="yes" message="Address Required">
<cfinput type="submit" name="Submit" value="Submit Details">
</cfformgroup>
</cfform>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cfformgroup-tag-how-to-use-panel-in.html
Example 91
<body>
<h2 style="color:DodgerBlue">cfformgroup example: Flash Format Form and
hdividedbox</h2>
<cfif IsDefined("Form.Submit")>
<cfoutput>
City Name: <b>#Form.City#!</b>
<br />
Zip: <b>#Form.Zip#</b>
</cfoutput>
</cfif>
<br /><br />
<cfform
name="FlashFormDevider"
method="post"
action=""
format="flash"
width="500"
height="250"
skin="halogreen"
>
<cfformgroup type="panel" label="City Details">
<cfformgroup type="hdividedbox">
<cfformgroup type="hbox">
<cfinput type="text" name="City" label="City"
required="yes" message="City Required">
</cfformgroup>
<cfformgroup type="hbox">
<cfinput type="text" name="Zip" label="Zip"
required="yes" message="Zip Required">
</cfformgroup>
</cfformgroup>
<cfinput type="submit" name="Submit" value="Submit City">
</cfformgroup>
</cfform>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cfformgroup-tag-how-to-use-horizontal.html
Example 92
<body>
<h2 style="color:DodgerBlue">cfformgroup example: Flash Format Form and
tabnavigator</h2>
<cfif IsDefined("Form.Submit")>
<cfoutput>
Country: <b>#Form.Country#</b>
<br />
City: <b>#Form.City#</b>
</cfoutput>
</cfif>
<br /><br />
<cfform
name="FlashFormTabNavigator"
method="post"
action=""
format="flash"
width="500"
height="250"
skin="halosilver"
>
<cfformgroup type="panel" label="Location Details">
<cfformgroup type="tabnavigator" label="User Address">
<cfformgroup type="page" label="Country">
<cfinput type="text" name="Country" label="Country"
required="yes" message="Country Required">
</cfformgroup>
<cfformgroup type="page" label="City">
<cfinput type="text" name="City" label="City"
required="yes" message="City Required">
</cfformgroup>
</cfformgroup>
<cfinput type="submit" name="Submit" value="Submit Location">
</cfformgroup>
</cfform>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cfformgroup-tag-how-to-use-tab.html
Example 93
<body>
<h2 style="color:DodgerBlue">cfformgroup example: Flash Format Form and
vdividedbox</h2>
<cfif IsDefined("Form.Submit")>
<cfoutput>
Guest Name: <b>#Form.Name#!</b>
<br />
Address: <b>#Form.Address#</b>
</cfoutput>
</cfif>
<br /><br />
<cfform
name="FlashFormExample"
method="post"
action=""
format="flash"
width="500"
height="250"
skin="haloblue"
>
<cfformgroup type="panel" label="Guest Details">
<cfformgroup type="vdividedbox">
<cfformgroup type="hbox">
<cfinput type="text" name="Name" label="Name"
required="yes" message="Name Required">
</cfformgroup>
<cfformgroup type="hbox">
<cfinput type="text" name="Address" label="Address"
required="yes" message="Address Required">
</cfformgroup>
</cfformgroup>
<cfinput type="submit" name="Submit" value="Submit Details">
</cfformgroup>
</cfform>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cfformgroup-tag-how-to-use-vertical.html
Example 94
<body>
<h2 style="color:Crimson">cffunction Tag Example</h2>
<body>
<h2 style="color:DodgerBlue">ColdFusion cfgrid example: HTML Format</h2>
<body>
<h2 style="color:Crimson; font-style:italic">cfimage tag example: how to
create captcha</h2>
<hr width="500" align="left" color="OrangeRed" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfimage-action-captcha-how-to-create.html
Example 97
<body>
<h2 style="color:OrangeRed; font-style:italic">cfimage tag example: how
to generate random captcha text</h2>
<hr width="600" align="left" color="OrangeRed" />
<br />
<cfset MyRandomNumber=RandRange(1000,10000)>
<cfset MyRandomText1="CF#MyRandomNumber#">
<cfset MyRandomNumber=RandRange(1000,10000)>
<cfset MyRandomText2="CF#MyRandomNumber#">
<cfset MyRandomNumber=RandRange(1000,10000)>
<cfset MyRandomText3="CF#MyRandomNumber#">
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfimage-how-to-generate-random-captcha.html
Example 98
<body>
<h2 style="color:Orangered; font-style:italic">cfimage tag example: how
to create and use captcha</h2>
<hr width="550" align="left" color="Orangered" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfimage-action-captcha-how-to-create_18.html
Example 99
<body>
<h2 style="color:SaddleBrown; font-style:italic">cfinput type datefield
example: how to use</h2>
<hr width="425" align="left" color="CadetBlue" />
<br />
<cfif IsDefined("Form.SubmitDate")>
<cfoutput>
<h3 style="color:OrangeRed;">
Your arrival date is: : #DateFormat(Form.DateChooser)#
</h3>
</cfoutput>
</cfif>
<body>
<h2 style="color:SaddleBrown; font-style:italic">cfinput type text
example: how to use autosuggest</h2>
<hr width="500" align="left" color="SaddleBrown" />
<br />
<cfif IsDefined("Form.SubmitCountry")>
<cfoutput>
<h3 style="color:OrangeRed;">
Your Country is: : #Form.Country#
</h3>
</cfoutput>
</cfif>
<body>
<h2 style="color:Firebrick; font-style:italic">cfinput type text example:
how to use range</h2>
<hr width="450" align="left" color="Firebrick" />
<br />
<cfif IsDefined("Form.SubmitAge")>
<cfoutput>
<h3 style="color:HotPink;">
Your age is: #Form.Age#
</h3>
</cfoutput>
</cfif>
<body>
<h2 style="color:SaddleBrown; font-style:italic">cfinput example: how to
use validateAt onserver</h2>
<hr width="475" align="left" color="RosyBrown" />
<br />
<cfif IsDefined("Form.SubmitAge")>
<cfoutput>
<h3 style="color:OrangeRed;">
Your age is: #Form.Age#
</h3>
</cfoutput>
</cfif>
<body>
<h2 style="color:Crimson">cfloop Tag Example: Array</h2>
<cfset ColorArray=ArrayNew(1)>
<cfset ColorArray[1]="Red">
<cfset ColorArray[2]="Green">
<cfset ColorArray[3]="Yellow">
<cfset ColorArray[4]="Blue">
<body>
<h2 style="color:Crimson">cfloop Tag Example: conditional</h2>
<cfset LoopEndPosition=5>
<cfoutput>
<b>Loop End Position:</b> #LoopEndPosition#
</cfoutput>
<br /><br />
<cfset Counter=0>
Loop Start...<br />
<cfloop condition="LoopEndPosition GT Counter">
<cfset Counter=Counter+1>
<cfoutput>
<b>Current Position:</b> #Counter#<br />
</cfoutput>
</cfloop>
Loop End...
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfloop-tag-example-how-to-use.html
Example 105
<body>
<h2 style="color:Crimson">cfloop Tag Example: date range</h2>
<cfset LoopStartDate="5-Dec-2008">
<cfset LoopEndDate="12-Dec-2008">
<cfoutput>
<b>LoopStartDate:</b> #LoopStartDate#<br />
<b>LoopEndDate:</b> #LoopEndDate#<br />
</cfoutput>
<br /><br />
<body>
<h2 style="color:Crimson">cfloop Tag Example: index</h2>
<cfoutput>
<b>Loop start[1 to 10]....</b><br />
<cfloop from="1" to="10" index="Counter">
Current position: #Counter#<br />
</cfloop>
<b>Loop End....</b><br />
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfloop-tag-example-how-to-use-index.html
Example 107
<body>
<h2 style="color:Crimson">cfloop Tag Example: List</h2>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfloop-tag-example-how-to-loop-
over_9969.html
Example 108
<body>
<h2 style="color:Crimson">cfloop Tag Example: Query</h2>
<cfoutput>
<table cellpadding="0" cellspacing="0" style="color:White"
border="1">
<tr bgcolor="HotPink">
<td><b>Emp_ID</b></td>
<td><b>FirstName</b></td>
<td><b>LastName</b></td>
</tr>
<cfloop query="qEmployees" startrow="1" endrow="10">
<tr bgcolor=#IIF(qEmployees.CurrentRow mod 2 eq
0,DE("IndianRed"),DE("Red"))#>
<td>#Emp_ID#</td>
<td>#FirstName#</td>
<td>#LastName#</td>
</tr>
</cfloop>
</table>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfloop-tag-example-how-to-loop-
over_1119.html
Example 109
<body>
<h2 style="color:Crimson">cfloop Tag Example: time range</h2>
<cfset LoopStartTime=CreateTime(0,0,0)>
<cfset LoopEndTime=CreateTime(5,0,0)>
<cfoutput>
<b>LoopStartTime:</b> #LoopStartTime#<br />
<b>LoopEndTime:</b> #LoopEndTime#<br />
</cfoutput>
<br /><br />
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfloop-tag-example-how-to-loop-
over_2980.html
Example 110
<body>
<h2 style="color:RosyBrown; font-style:italic">cfmenu example: how to
use</h2>
<hr width="500" align="left" color="RosyBrown" />
<br />
<cfmenu
name="MainMenu"
bgcolor="Wheat"
font="Tahoma, Geneva, sans-serif"
fontcolor="SaddleBrown"
fontsize="17"
selectedfontcolor="RosyBrown"
selecteditemcolor="MistyRose"
type="horizontal"
menustyle="border:solid; border-width:medium; font-weight:bold; text-
decoration:underline; color:SaddleBrown;"
>
<cfmenuitem display="Home" href="home.cfm"/>
<cfmenuitem display="Business" href="business.cfm"/>
<cfmenuitem
display="SoftWare"
href="softWare.cfm"
childstyle="border:solid; border-width:thin; font-weight:bold;
text-decoration:underline; color:Wheat; background-color:Tan;"
>
<cfmenuitem display="Flex" href="flex.cfm"/>
<cfmenuitem display="Photoshop" href="photoshop.cfm"/>
</cfmenuitem>
</cfmenu>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfmenu-tag-how-to-create-and-use-menu.html
Example 111
<body>
<h2 style="color:RosyBrown; font-style:italic">cfmenuitem example: how to
use</h2>
<hr width="500" align="left" color="RosyBrown" />
<br />
<cfmenu
name="MainMenu"
bgcolor="Crimson"
font="Arial, Helvetica, sans-serif"
fontcolor="SeaShell"
fontsize="17"
selectedfontcolor="Crimson"
selecteditemcolor="SeaShell"
type="horizontal"
menustyle="border:solid; border-width:medium; font-weight:bold;
color:SaddleBrown;"
>
<cfmenuitem display="Home" href="home.cfm"/>
<cfmenuitem display="Contact" href="contact.cfm"/>
<cfmenuitem
display="Product"
href="product.cfm"
childstyle="border:solid; border-width:thin; font-weight:bold;
text-decoration:underline; color:Snow; background-color:OrangeRed;"
>
<cfmenuitem display="Flex" href="flex.cfm"/>
<cfmenuitem display="Photoshop" href="photoshop.cfm"/>
</cfmenuitem>
<cfmenuitem display="Faq's" href="faqs.cfm"/>
</cfmenu>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfmenuitem-tag-how-to-use-cfmenuitem.html
Example 112
<body>
<h2 style="color:crimson">cfquery example: how to select data</h2>
<cfquery name="qEmployee" datasource="cfdocexamples">
SELECT FirstName, LastName, Salary FROM Employee
</cfquery>
<cfdump var="#qEmployee#">
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfquery-example-how-to-select-data.html
Example 113
<body>
<h2 style="color:hotpink">cfquery example: data delete</h2>
<body>
<h2 style="color:hotpink">cfquery example: data insert</h2>
<cfquery name="qAuthorsInsert" datasource="cfbookclub"
result="AuthorsInsert">
INSERT INTO AUTHORS (FirstName, LastName) VALUES('Forta','Ben')
</cfquery>
<cfdump var="#AuthorsInsert#">
<body>
<h2 style="color:hotpink">cfquery example: data update</h2>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfquery-tag-example-how-to-update-data.html
Example 116
<body>
<h2 style="color:hotpink">cfquery example: using result</h2>
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example:
Array</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<br />
<cfscript>
ColorArray = ArrayNew(1);
temp = ArrayAppend(ColorArray,"Crimson");
temp = ArrayAppend(ColorArray,"Red");
temp = ArrayAppend(ColorArray,"SeaGreen");
temp = ArrayAppend(ColorArray,"OrangeRed");
</cfscript>
<cfif IsDefined("ColorArray")>
<cfdump var="#ColorArray#">
</cfif>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfscript-tag-how-to-create-and-use.html
Example 118
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript tag example:
assign variable</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<br />
<cfscript>
firstNumber = 10;
secondNumber = 5;
sum = firstNumber+secondNumber;
WriteOutput("<h3 style='color:Crimson; font-weight:bold'>");
WriteOutput("Sum of two numbers [10+5]: ");
WriteOutput(sum);
WriteOutput("</h3>");
</cfscript>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfscript-tag-how-to-assign-variable-in.html
Example 119
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example: if
else</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<br />
<cfscript>
if (IsDefined("Form.Submit"))
{
if (Form.UserName neq "")
{
WriteOutput("Hello ");
WriteOutput(Form.UserName);
}
else
WriteOutput("Please input your name");
}
</cfscript>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/how-to-use-if-else-conditional.html
Example 120
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example:
Structure</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<br />
<cfscript>
ColorStruct = StructNew();
ColorStruct.Name = "BlueViolet";
ColorStruct.Value = "##8A2BE2";
</cfscript>
<cfif IsDefined("ColorStruct")>
<cfdump var="#ColorStruct#">
</cfif>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfscript-tag-how-to-create-and-use_21.html
Example 121
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example: switch
statement</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<br />
<cfscript>
if (IsDefined("Form.Submit") and (Form.FavColor neq ""))
{
switch(Form.FavColor){
case "Crimson":
WriteOutput("Crimson is red type color");
break;
case "DodgerBlue":
WriteOutput("Crimson is blue type color");
break;
case "SeaGreen":
WriteOutput("Crimson is green type color");
break;
default:
WriteOutput("You input an unknown color.");
}
}
</cfscript>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/how-to-use-switch-case-default.html
Example 122
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example:
function call</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<h3 style="color:SaddleBrown;">
<cfscript>
WriteOutput("#Hello("Jenny")#");
</cfscript>
</h3>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfscript-tag-how-to-call-user-defined.html
Example 123
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example: do
while loop</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<h4 style="color:SeaGreen;">
<cfscript>
counter = 1;
do{
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfscript-tag-how-to-use-do-while-loop.html
Example 124
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example: for
loop</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<h4 style="color:DarkBlue;">
<cfscript>
for(i=1; i LTE 10; i++){
WriteOutput("Current Position: #i# <br />") ;
}
</cfscript>
</h4>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfscript-tag-how-to-use-for-loop-in.html
Example 125
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example: create
function</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<h3 style="color:CornflowerBlue;">
<cfscript>
function hello (userName){
sayHello = "Hello #userName# !";
return sayHello;
}
WriteOutput("#hello("Jones")#");
</cfscript>
</h3>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfscript-tag-how-to-create-call-and-use.html
Example 126
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example: Query
Output</h2>
<hr width="350" align="left" color="PaleVioletRed" />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfscript-tag-how-to-get-query-result.html
Example 127
cfselect tag: how to use cfselect with cfquery and static option
<body>
<h2 style="color:DodgerBlue">cfselect example: With cfquery and Static
option</h2>
<cfif IsDefined("Form.Submit")>
You selected Art: <cfoutput><b>#Form.Art#</b></cfoutput>
<br />
</cfif>
<body>
<h2 style="color:DodgerBlue">cfselect example: Multiple Selection</h2>
<cfif IsDefined("Form.Submit")>
You selected Employees: <cfoutput><b>#Form.Employee#</b></cfoutput>
<br /><br />
</cfif>
<body>
<h2 style="color:DeepPink; font-style:italic">cfsetting tag example: how
to use enablecfoutputonly attribute</h2>
<hr width="600" align="left" color="OrangeRed" />
<br />
<cfset MyRandomNumber=RandRange(1,100)>
<cfsetting enablecfoutputonly="no">
<h3 style="color:SeaGreen">
My random number: <cfoutput>#MyRandomNumber#</cfoutput>
</h3>
<cfsetting enablecfoutputonly="yes">
<h3 style="color:SeaGreen">
My random number: <cfoutput>#MyRandomNumber#</cfoutput>
</h3>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfsetting-how-to-use-enablecfoutputonly.html
Example 130
<body>
<h2 style="color:DeepPink; font-style:italic">cfsilent tag example: how
to use cfsilent</h2>
<hr width="400" align="left" color="OrangeRed" />
<br />
<h3 style="color:DarkSeaGreen">
cfsilent tag block start...
</h3>
<cfsilent>
<cfquery name="qEmployee" datasource="cfdocexamples" maxrows="5">
SELECT Emp_ID, FirstName, LastName FROM EMPLOYEE
</cfquery>
<cfdump var="#qEmployee#">
</cfsilent>
<h3 style="color:DarkSeaGreen">
....cfsilent tag block end
</h3>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfsilent-how-to-use-cfsilent-for.html
Example 131
<body>
<h2 style="color:Crimson">cfswitch Tag Example</h2>
<cfset Theme="Pink">
<cfswitch expression="#Theme#">
<cfcase value="Pink">
<cfset HeaderRowColor="Crimson">
<cfset RegularRowColor="Pink">
<cfset AlternetRowColor="HotPink">
</cfcase>
<cfcase value="Green">
<cfset HeaderRowColor="Green">
<cfset RegularRowColor="SeaGreen">
<cfset AlternetRowColor="LightGreen">
</cfcase>
<cfdefaultcase>
<cfset HeaderRowColor="White">
<cfset RegularRowColor="White">
<cfset AlternetRowColor="White">
</cfdefaultcase>
</cfswitch>
<cfoutput>
<table cellpadding="0" cellspacing="0">
<tr bgcolor=#HeaderRowColor#>
<td><b>AuthorID</b></td>
<td><b>FirstName</b></td>
<td><b>LastName</b></td>
</tr>
<cfloop query="qAuthor">
<tr bgcolor=#IIF(qAuthor.CurrentRow mod 2 eq
0,DE(RegularRowColor),DE(AlternetRowColor))#>
<td>#AuthorID#</td>
<td>#FirstName#</td>
<td>#LastName#</td>
</tr>
</cfloop>
</table>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfswitch-tag-example-how-to-use.html
Example 132
<body>
<h2 style="color:OliveDrab; font-style:italic">cfcase tag example: how to
use delimiters attribute</h2>
<hr width="500" align="left" color="Olive" />
<br />
<cfif IsDefined("Form.SubmitColor")>
<cfoutput>
<h3 style="color:OrangeRed;">
<cfswitch expression="#Form.Color#">
<cfcase value="Red;Crimson;IndianRed" delimiters=";">
You choose red type color.
</cfcase>
<cfcase value="Orange;OrangeRed" delimiters=";">
You choose orange type color.
</cfcase>
<cfcase value="DodgerBlue;CornFlowerBlue;Blue"
delimiters=";">
You choose blue type color.
</cfcase>
<cfdefaultcase>
You choose unknown type color.
</cfdefaultcase>
</cfswitch>
</h3>
</cfoutput>
</cfif>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfcase-tag-how-to-use-delimiters.html
Example 133
<body>
<h2 style="color:Crimson">cfcol Tag Example</h2>
<cftable
query="qSponsors"
border="yes"
maxrows="10"
startrow="1"
colspacing="1"
colheaders="yes"
>
<cfcol header="Sponsor ID" align="left" text="#SponsorID#">
<cfcol header="Sponsor Name" align="left" text="#SponsorName#">
<cfcol header="Web Address" align="left" text="#WebAddress#">
<cfcol header="City" align="left" text="#City#">
<cfcol header="State" align="left" text="#State#">
</cftable>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfcol-tag-example-how-to-use-cfcol-tag.html
Example 134
<body>
<h2 style="color:Crimson">cftable Tag Example: HTML Table</h2>
<cftable
query="qAuthors"
border="yes"
maxrows="8"
startrow="1"
colspacing="1"
colheaders="yes"
htmltable="yes"
headerlines="1"
>
<cfcol header="Author ID" align="left" text="#AuthorID#">
<cfcol header="First Name" align="left" text="#FirstName#">
<cfcol header="Last Name" align="left" text="#LastName#">
</cftable>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cftable-tag-example-how-to-build-
table_31.html
Example 135
cftextarea tag: how to use rich text area with basic toolbar in
coldfusion
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cftextarea tag: how to use rich text area with basic toolbar in
coldfusion</title>
</head>
<body>
<h2 style="color:SaddleBrown; font-style:italic">cftextarea example: how
to use rich text area</h2>
<hr width="450" align="left" color="SaddleBrown" />
<br />
<cfif IsDefined("Form.SubmitColors")>
<cfoutput>
<h3 style="color:DeepPink;">
Your favorite colors are: #Form.Colors#
</h3>
</cfoutput>
</cfif>
<body>
<h2 style="color:DodgerBlue">ColdFusion cftry and cfcatch example</h2>
<cftry>
<!---Here i input wrong table name--->
<cfquery name="qEmployee" datasource="cfdocexamples">
SELECT * FROM Employeess
</cfquery>
<cfdump var="#qEmployee#">
<cfcatch type="any">
<cfoutput>
Error occured....<br /><br />
Message: <b>#cfcatch.Message#</b><br />
Detail: <b>#cfcatch.Detail#</b><br />
Type: <b>#cfcatch.Type#</b><br />
</cfoutput>
</cfcatch>
</cftry>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cftry-and-cfcatch-tag-example-how-to.html
Example 137
<body>
<h2 style="color:Crimson">cfabort Tag Example</h2>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfabort-tag-example-how-to-stop.html
Example 138
<body>
<h2 style="color:Crimson">cfbreak Tag Example</h2>
</body>
</html>
http://coldfusion-example.blogspot.com/2008/12/cfbreak-tag-example-how-to-use-cfbreak.html
Example 139
<body>
<h2 style="color:SteelBlue; font-style:italic">cfcache tag example: how
to cache web pages</h2>
<hr width="450" align="left" color="SteelBlue" />
<br />
<cfcache timespan="#CreateTimeSpan(0,0,5,0)#">
<cfoutput>
<h3 style="color:DeepPink">
This page create at #TimeFormat(Now())# and cache for 5 minutes.
</h3>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfcache-tag-how-to-cache-web-page-in.html
Example 140
<body>
<h2 style="color:DodgerBlue">ColdFusion cfdbinfo tag example: Column
List</h2>
<cfdump var="#qColumnList#">
</body>
</html>
http://coldfusion-example.blogspot.com/2009/02/cfdbinfo-tag-example-how-to-get-column.html
Example 141
<body>
<h2 style="color:DeepPink; font-style:italic">cfflush tag example: how to
use cfflush</h2>
<hr width="400" align="left" color="OrangeRed" />
<br />
<cfflush interval="1">
<cfoutput>
<cfloop index="i" from=1 to="500000">
<cfif i EQ 100000 or i EQ 200000 or i EQ 300000 or i EQ 400000
or i EQ 500000>
<h3 style="color:SeaGreen">
The loop current index is: #i#
<br />
</h3>
</cfif>
</cfloop>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfflush-how-to-use-interval-attribute.html
Example 142
<body>
<h2 style="color:DodgerBlue">cflocation example: How to Redirect</h2>
<cflocation
url="http://coldfusion-example.blogspot.com/"
addtoken="yes"
>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/cflocation-tag-how-to-redirect-page.html
Example 143
<body>
<h2 style="color:OrangeRed; font-style:italic">cfloginuser tag example:
how to create simple login logout system</h2>
<hr width="625" align="left" color="Crimson" />
<br />
<cfif IsDefined("LoginButton")>
<cfif Form.UserName eq "jenny" and Form.Password eq "password">
<cflogin>
<cfloginuser name="jenny" password="password" roles="admin">
</cflogin>
</cfif>
</cfif>
<cfif IsDefined("LogoutButton")>
<cflogout>
</cfif>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/how-to-create-authentication-system.html
Example 144
<body>
<h2 style="color:DarkBlue; font-style:italic">ColdFusion cfqueryparam tag
example: how to use cfsqltype</h2>
<hr width="600" align="left" color="PowderBlue" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/cfqueryparam-and-cfsqltype-how-to-use.html
Example 145
<body>
<h2 style="color:SeaGreen; font-style:italic">Ajax Example:
ColdFusion.Layout.disableTab</h2>
<hr width="500" align="left" color="LightPink" />
<br />
<a
href="JavaScript:ColdFusion.Layout.disableTab('ImageLayout','CuteFish')">
<b>Disable Tab [Cute Fish]</b>
</a>
<br /><br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/ajax-how-to-disable-layout-tab.html
Example 146
<body>
<h2 style="color:Crimson; font-style:italic">Ajax Example:
ColdFusion.Layout.enableTab</h2>
<hr width="500" align="left" color="LightPink" />
<br />
<a
href="JavaScript:ColdFusion.Layout.enableTab('ImageLayout','SecondTab')">
<b>Enable Tab [Second Bee Tab]</b>
</a>
<br /><br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/ajax-how-to-enable-layout-tab.html
Example 147
<body>
<h2 style="color:Crimson; font-style:italic">Ajax Example:
ColdFusion.Layout.hideTab</h2>
<hr width="500" align="left" color="LightPink" />
<br />
<a href="JavaScript:ColdFusion.Layout.hideTab('HideTestLayout','Tab2')">
<b>Hide Tab [Second Elephant Tab]</b>
</a>
<br /><br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/ajax-how-to-hide-layout-tab.html
Example 148
<body>
<h2 style="color:Crimson; font-style:italic">Ajax Example:
ColdFusion.Layout.selectTab</h2>
<hr width="500" align="left" color="LightPink" />
<br />
<a href=
"JavaScript:ColdFusion.Layout.selectTab('HideTestLayout','CartoonTab')">
<b>Select Tab [Cartoon Tab]</b>
</a>
<br /><br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/ajax-how-to-select-layout-tab.html
Example 149
<body>
<h2 style="color:Crimson; font-style:italic">Ajax Example:
ColdFusion.Layout.showTab</h2>
<hr width="500" align="left" color="LightPink" />
<br />
<a href="JavaScript:ColdFusion.Layout.showTab('HideTestLayout','Tab2')">
<b>Show Tab [Second Tab]</b>
</a>
<br /><br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/ajax-how-to-show-layout-tab.html
Example 150
<body>
<h2 style="color:Crimson; font-style:italic">Ajax JavaScript Function
example: ColdFusion.Window.create</h2>
<hr width="600" align="left" color="CadetBlue" />
<br />
<cfajaximport tags="cfwindow">
<a href="JavaScript:ColdFusion.Window.create('ButterflyWindow','Butterfly
Image','Butterfly.cfm',{height:375,
width:450,x:25,y:150,draggable:false,closable:false})">
<b>Show Butterfly Image Window</b>
</a>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/ajax-javascript-function-how-to-create.html
Example 151
function linkClick() {
ColdFusion.Window.onHide("ButterflyImageWindow", onhide);
ColdFusion.Window.hide("ButterflyImageWindow");
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajax JavaScript Function: how to use ColdFusion.Window.onHide in
coldfusion</title>
</head>
<body>
<a href="JavaScript:linkClick()">
<b>Hide the Window</b>
</a>
<cfwindow
name="ButterflyImageWindow"
title="Butterfly Image Explorere"
initshow="true"
x="25"
y="150"
height="400"
width="485"
closable="false"
draggable="false"
>
<img src="Images/Butterfly9.jpg" height="321" width="450" />
</cfwindow>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/ajax-javascript-function-how-to-use_01.html
Example 152
function showLinkClick() {
ColdFusion.Window.onShow("ButterflyWindow", onhide);
ColdFusion.Window.show("ButterflyWindow");
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ajax JavaScript Function: how to use ColdFusion.Window.onShow in
coldfusion</title>
</head>
<body>
<a href="JavaScript:showLinkClick()">
<b>Show the Window</b>
</a>
<cfwindow
name="ButterflyWindow"
title="Butterfly Image"
x="25"
y="150"
height="350"
width="510"
closable="false"
draggable="false"
initshow="false"
>
<img src="Images/Butterfly10.jpg" height="287" width="468" />
</cfwindow>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/ajax-javascript-function-how-to-use.html
Example 153
<body>
<h2 style="color:DeepPink; font-style:italic">Ajax JavaScript Function
example: Window Show Hide</h2>
<hr width="550" align="left" color="Olive" />
<br />
<a href="JavaScript:ColdFusion.Window.show('CuteFlower')">
<b>Show the Window</b>
</a>
<a href="JavaScript:ColdFusion.Window.hide('CuteFlower')">
<b>Hide the Window</b>
</a>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/ajax-javascript-function-how-to-show_29.html
Example 154
<body>
<h2 style="color:Olive; font-style:italic">Ajax JavaScript Function
example: ColdFusion.Window.show</h2>
<hr width="550" align="left" color="Beige" />
<br />
<a href="JavaScript:ColdFusion.Window.show('ImageExplorer')">
<b>Click here for show the window</b>
</a>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/ajax-javascript-function-how-to-show.html
Example 155
<body>
<h2 style="color:CornflowerBlue; font-style:italic">Ajax JavaScript
Function example: ColdFusion.Window.hide</h2>
<hr width="550" align="left" color="Beige" />
<br />
<a href="JavaScript:ColdFusion.Window.hide('ImageExplorer')">
<b>Click for hide the window</b>
</a>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/ajax-javascript-function-how-to-hide.html
Example 156
<body>
<h2 style="color:DeepPink; font-style:italic">cfajaximport tag example:
how to use</h2>
<hr width="400" align="left" color="OrangeRed" />
<br />
<cfajaximport tags="cfwindow">
<a href="JavaScript:ColdFusion.Window.create('ImageWindow','Butterfly
Image','Image.cfm',{width:450, height:375})">
<h3 style="color:RosyBrown">
<b>Click to see butterfly image</b>
</h3>
</a>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfajaximport-tag-how-to-use.html
Example 157
<body>
<h2 style="color:DodgerBlue">cflayout example: How to use</h2>
<cflayout name="ImageExplorer" type="hbox">
<cflayoutarea name="OrchidImage">
<cfpod
title="Orchid"
height="400"
width="475"
>
<img src="./Images/Orchid.jpg" />
</cfpod>
</cflayoutarea>
<cflayoutarea name="Orchid1Image">
<cfpod
title="Orchid"
height="300"
width="360"
>
<img src="./Images/Orchid1.jpg" />
</cfpod>
</cflayoutarea>
</cflayout>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/how-to-use-cflayout-with-type-hbox-and.html
Example 158
<body>
<h2 style="color:DodgerBlue">ColdFusion cflayout example: With
cflayoutarea</h2>
<cflayout type="tab" tabposition="bottom">
<cflayoutarea title="Doll">
<img src="./Images/Doll.jpg"/>
</cflayoutarea>
<cflayoutarea title="Doll1">
<img src="./Images/Doll1.jpg"/>
</cflayoutarea>
<cflayoutarea title="Doll2">
<img src="./Images/Doll2.jpg"/>
</cflayoutarea>
</cflayout>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/how-to-use-cflayout-with-cflayoutarea.html
Example 159
<body>
<h2 style="color:DodgerBlue">ColdFusion cflayout example: Type vbox</h2>
<cflayout name="ImageExplorer" type="vbox">
<cflayoutarea name="OrchidImage">
<cfpod
title="Flower"
height="200"
width="250"
>
<img src="./Images/Flower.jpg" width="75%" height="75%" />
</cfpod>
</cflayoutarea>
<cflayoutarea name="Orchid1Image">
<cfpod
title="Flower 1"
height="200"
width="250"
>
<img src="./Images/Flower2.jpg" width="75%" height="75%" />
</cfpod>
</cflayoutarea>
</cflayout>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/how-to-use-cflayout-with-type-vbox-and.html
Example 160
<body>
<h2 style="color:DimGray; font-style:italic">cflayout example: layout
type border</h2>
<hr width="500" align="left" color="LightPink" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cflayout-tag-how-to-create-border-type.html
Example 161
<body>
<h2 style="color:SeaGreen; font-style:italic">cflayout example: closable
layoutarea</h2>
<hr width="550" align="left" color="LightPink" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cflayout-tag-how-to-create-closable.html
Example 162
<body>
<h2 style="color:SaddleBrown; font-style:italic">cflayout example:
collapsible layoutarea</h2>
<hr width="550" align="left" color="LightPink" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cflayout-tag-how-to-create-collapsible.html
Example 163
<body>
<h2 style="color:SeaGreen; font-style:italic">cflayout example: using
splitter in border type layout</h2>
<hr width="550" align="left" color="LightPink" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/05/cflayout-tag-how-to-use-splitter-in.html
Example 164
<body>
<h2 style="color:DodgerBlue">cfpod example: InLine Content</h2>
<cfpod
title="Sea Fish"
height="325"
width="495"
>
<img src="./Images/Fish.jpg" />
</cfpod>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/03/how-to-use-cfpod-with-inline-content.html
Example 165
<body>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfpresentation-tag-how-to-use.html
Example 166
<body>
<cfoutput>
<cfpresentation title="Dog Show">
<cfpresenter name="Jenny Jones" email="Jones@www.www">
<cfpresenter name="Raymond Roy" email="Raymond@www.www">
<cfpresentationslide title="Forest Dog" duration="30"
presenter="Jenny Jones">
<h4 style="color:LightSlateGray;">
Forest Dog
</h4>
<img src="Images/Dog2.jpg" />
</cfpresentationslide>
<cfpresentationslide title="Cute Dog" duration="30"
presenter="Raymond Roy">
<h4 style="color:DarkSalmon;">
Cute Dog
</h4>
<img src="Images/Dog3.jpg" />
</cfpresentationslide>
</cfpresentation>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfpresenter-tag-how-to-show-presenter.html
Example 167
<body>
<cfoutput>
<cfpresentation title="Employee Data">
<cfloop query="qEmployee">
<cfpresentationslide title="Employee ID [#qEmployee.Emp_ID#]"
duration="15">
<h4 style="color:LightSlateGray;">
<br />
Employee ID: #qEmployee.Emp_ID# <br />
Department: #qEmployee.Department# <br />
Name: #qEmployee.FirstName# #qEmployee.LastName# <br />
Email: #qEmployee.Email#
</h4>
</cfpresentationslide>
</cfloop>
</cfpresentation>
</cfoutput>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfpresentation-tag-how-to-present-query.html
Example 168
<body>
<h2 style="color:DeepPink; font-style:italic">cfslider tag example: how
to use</h2>
<hr width="400" align="left" color="OrangeRed" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/06/cfslider-tag-how-to-use-cfslider-in.html
Example 169
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfwindow tag example: how
to use</h2>
<hr width="400" align="left" color="CadetBlue" />
<br />
<cfwindow
name="FlowerWindow"
title="Flower Image"
initshow="true"
modal="false"
resizable="false"
height="450"
width="550"
>
<img src="Images/Flowers.gif"/>
</cfwindow>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/04/cfwindow-tag-how-to-use-cfwindow-in.html
Example 170
<body>
<h2 style="color:DodgerBlue; font-style:italic">coldfusion nested
functions example: how to use</h2>
<hr width="500" align="left" color="PowderBlue" />
<br />
<cfset Today=UCase(DateFormat(Now(),"dd-mmmm-yyyy"))>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/nested-functions-how-to-use-nested.html
Example 171
<body>
<h2 style="color:DodgerBlue; font-style:italic">coldfusion server
variables example: how to get output</h2>
<hr width="500" align="left" color="PowderBlue" />
<br />
<cfdump var="#server#">
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/server-variables-how-to-dump-and-get.html
Example 172
<body>
<h2 style="color:Crimson; font-style:italic">DataSource example: how to
get DataSource list</h2>
<hr width="500" align="left" color="LightPink" />
<br />
<cfobject
action="create"
type="java"
class="coldfusion.server.ServiceFactory"
name="cfactory"
>
<cfset DSourceStruct=cfactory.getDataSourceService().getDataSources()>
<cfset DSourceList=StructKeyList(DSourceStruct,",")>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/datasource-list-how-to-get-coldfusion.html
Example 173
<body>
<h2 style="color:DarkBlue; font-style:italic">coldfusion dynamic
variables example: how to use</h2>
<hr width="500" align="left" color="LightBlue" />
<br />
<cfset ColorName="Crimson">
<cfset "#ColorName#"="Red type color">
<cfdump var="#Variables#">
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/coldfusion-dynamic-variables-how-to.html
Example 174
<body>
<h2 style="color:DarkBlue; font-style:italic">coldfusion functions masks
example: how to use</h2>
<hr width="450" align="left" color="LightBlue" />
<br />
<cfset Salary=1525>
<cfset SalaryWithMask=NumberFormat(Salary,"$")>
<cfset ToDay=DateFormat(Now())>
<cfset ToDayWithMask=DateFormat(Now(),"mmmm-dd-yyyy")>
<body>
<h2 style="color:SeaGreen; font-style:italic">ColdFusion Variables are
typeless example: how to verify</h2>
<hr width="600" align="left" color="DarkSeaGreen" />
<br />
<cfset TestNumber=5>
<cfset TestString="20">
<cfset SampleMath=TestNumber*TestString>
<cfset SampleString="First Number: " & TestNumber & " Second Number: " &
TestString>
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/coldfusion-variables-are-typeless-how.html
Example 176
<body>
<h2 style="color:Crimson; font-style:italic">ColdFusion query caching
example: how to cache query in Application scope</h2>
<hr width="600" align="left" color="LightPink" />
<br />
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/application-scopes-query-caching-how-to.html
Example 177
<body>
<h2 style="color:DarkBlue; font-style:italic">ColdFusion query caching
example: how to cache query in server scope</h2>
<hr width="750" align="left" color="LightBlue" />
<br />
<cfset server.admin="cfsuman">
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/server-scopes-query-caching-how-to.html
Example 178
<body>
<h2 style="color:Crimson; font-style:italic">ColdFusion query caching
example: how to cache query in session scope</h2>
<hr width="600" align="left" color="LightPink" />
<br />
<cfset Session.UserName="cfsuman">
</body>
</html>
http://coldfusion-example.blogspot.com/2009/12/session-scopes-query-caching-how-to.html