ColdFusion Tips and Tutorials

ColdFusion Tips and Tutorials. Tips on ColdFusion, AJAX, CSS, JavaScript, HTML, Design, and more.

CFUnited Developer Conference 2010
Use this code TIPSCUST to get $100 off your registration @ CFUnited! We'll see you There!


ColdFusion Tips
Page 1 2 3
78 Quick Pick
77 Execute | Training | Moving List and Sit
76 Site Watcher
75 Automatic Reports
74 Disable Text and Check Boxes | New Job i
73 Filing Pictures
72 Top 5 in Bar and Pie Chart
71 Progressive Display | .CFM The ColdFusi
70 Background Quick Query
69 Back Channel to Server
68 Spellcheck with a Web Site Indexer
67 Read ColdFusion Arrays
66 Cookie Overload
65 Gulp Detail
64 Session Persistence
63 Parsing Variable-Length Fields | Simple
62 Augmentation of Automatic Javascript | C
61 Automatic Javascript
60 Active Database Display | Passing Arrays
59 Analyze a Directory Tree
58 Page Forward and Back
57 Group Profiles
56 Event Status | Upper Casing
55 Remote Control | Uppercase The first let
54 cffile Helper Tips | CFHttp in Use
53 Live Messaging | Using DateDiff Functi
52 Filtering and Selecting Records | CFMail
51 Connection Speed | Dynamic Columns Ver.1
50 Hiding Data in Plain Sight
49 Lost CF Administrator Password | Websit
48 cfinsert and cfupdate: No SQL Required!
47 Returning customized Word docments in C
46 ColdFusion 5.0: What's new? | Applicati
45 ColdFusion Arrays | Where is my Check
44 Formatting cfmail | Multiple Post Loc
43 To or not to | Whe
42 Trimming the fat | Application.cfm
41 cfswitch | Scroll Background | SQL and S
40 CreateODBCDate | Working with Excel
39 Christmas Count | Jump Station | SiteSta
38 What a Weekend | Cycle through Multiple
37 Using Regular Expressions in CF
36 Kill a Session? | CFStudio Instances |
35 Allaire 2k Conference | UK Date converte
34 Grouping Output | Uppercase text boxes
33 No Bake Cookies | Structures
32 Daily Cartoon Server | Reusable Custom
31 Week Range | Detect Click
30 Simply Query and Output | Dump a Quer
29 Dynamic Select Box | cfloop | cfobject
28 OUTLOOK: Create a contact , List Contac
27 application.cfm and onrequestend.cfm | c
26 Check Boxes | Page 1,2,3,.. | Curren
25 CFFORM | Second Dropdown Populated by fi
24 cfinclude | Capitalize TextBox | Simple
23 Comma Formating | Creating a Custom Tag
22 Convert Hours to Mins and back | Directo
21 Generate Random AlphaNumeric Passwords |
20 cftransaction | cfmail | Justify in IE
19 Dynamic Check Boxes | Break your site ou
18 Disable Caching | Dynamically Change Tex
17 Cfregistry create a key | Display Code T
16 2D Array Sorting | Cntrl - N and cntrl
15 Fusebox 101: Lesson 5 | cfabort | Shift-
14 Fusebox 101: Lesson 4 | Page Break When
13 Fusebox 101: Lesson 3 | Custom Tags not
12 Fusebox 101: Lesson 2 | SQL Insert
11 Fusebox 101: Lesson 1 | Add dynamically
10 Debug Tool | FuseBox | Deploy
9 No Refresh Stopping the Back Button. |
Page 1 2 3



Custom Search
=============================================================
COLDFUSION TIPS PLUS Volume 00 Issue 16
=============================================================

I. My Comments:

II. ColdFusion Tip: 2D Array Sorting

III. Website: webos.org CF Site

IV. Quick Tip: Cntrl - N and cntrl - Tab


=============================================================
I. My Comments:

All Future e-ZINES will be saved in the member area
of my website. I am creating a cf portal for
all of us.

If you have suggestions please email me at cftips @nsnd.com.
Remove the Space to make it work correctly


=============================================================
II. ColdFusion Tip: 2D Array Sorting
=============================================================

<cfapplication sessionmanagement="Yes" name="Test">

<cfset x1="3, 4, 22, 2">
<cfset x2="16, 3, 35, 67">
<cfset x3="43, 45, 68, 62">
<cfset x4="78, 63, 30, 23">
<cfset x5="26, 23, 27, 6">
<cfset x6="11, 84, 74, 43">

<CFSET myArray = ArrayNew(2)>

<cfoutput>

<cfloop from="1" to="4" index="z">

<cfset myArray[1][z]= #ListGetAt(x1,z)#>
<cfset myArray[2][z]= #ListGetAt(x2,z)#>
<cfset myArray[3][z]= #ListGetAt(x3,z)#>
<cfset myArray[4][z]= #ListGetAt(x4,z)#>
<cfset myArray[5][z]= #ListGetAt(x5,z)#>
<cfset myArray[6][z]= #ListGetAt(x6,z)#>

</cfloop>

</cfoutput>


<html>
<head>
<title>Sorting A 2D Array</title>
</head>

<body bgcolor="ffffff">
<center>
<font face="Arial,Helvetica,sans-serif" size="-1" color="000000">
Pick Which Row to Sort
</font>
</center>
<cfparam name="url.row" default="2">
<cfif #url.row# gt 4>
<cfset row=3>
<cfelse>
<cfset row=#url.row#>
</cfif>

<cfoutput>
<table align="center" border="1" bordercolor="006699"
cellpadding="0" cellspacing="0" width="500">

<tr bgcolor="006699">

<td>
<font face="Arial,Helvetica,sans-serif" size="-1" color="FFFFFF">
<b>Before</b></
font>
</td>
</tr>
<tr bgcolor="dddddd">

<td>
<font face="Arial,Helvetica,sans-serif" size="-1" color="000000">
Sort Row
<a href="sorting_a_3d_array.cfm?row=1">1</a> |
<a href="sorting_a_3d_array.cfm?row=2">2</a> |
<a href="sorting_a_3d_array.cfm?row=3">3</a> |
<a href="sorting_a_3d_array.cfm?row=4">4</a>
</font>
</td>
</tr>
<tr>

<td>

<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="dddddd">

<td>#MyArray[1][1]#</td>
<td>#MyArray[1][2]# </td>
<td>#MyArray[1][3]#</td>
<td>#MyArray[1][4]# </td>
</tr>
<tr>

<td>#MyArray[2][1]#</td>
<td> #MyArray[2][2]#</td>
<td>#MyArray[2][3]#</td>
<td>#MyArray[2][4]#</td>
</tr>
<tr bgcolor="dddddd">

<td>#MyArray[3][1]#</td>
<td>#MyArray[3][2]#</td>
<td>#MyArray[3][3]#</td>
<td>#MyArray[3][4]# </td>
</tr>
<tr>

<td>#MyArray[4][1]#</td>
<td> #MyArray[4][2]#</td>
<td>#MyArray[4][3]#</td>
<td>#MyArray[4][4]# </td>
</tr>
<tr bgcolor="dddddd">

<td>#MyArray[5][1]# </td>
<td>#MyArray[5][2]#</td>
<td> #MyArray[5][3]# </td>
<td>#MyArray[5][4]# </td>
</tr>
<tr>

<td>#MyArray[6][1]#</td>
<td>#MyArray[6][2]#</td>
<td> #MyArray[6][3]#</td>
<td>#MyArray[6][4]# </td>
</tr>
</table>


</td>
</tr>
</table>
</cfoutput>
<!--- Now Do the Sorting. --->

<cfset session.TotalRecords = 6>
<cfset session.array_name ="myArray">
<!-- BEGIN BUBBLE SORT -->
<cfset outerloopend = session.TotalRecords>
<cfset innerloopend = session.TotalRecords-1>
<cfset innerloopstart = 1>
<cfset temp = 1>

<CFLOOP INDEX="outerloop" FROM="1" TO="#outerloopend#">
<CFLOOP INDEX= "innerloop" FROM="#innerloopstart#" TO="#innerloopend#">
<cfif #myArray[innerloop][row]# gt #myArray[outerloop][row]#>
<CFSET temp = ArraySwap(myArray,outerloop,innerloop)>
</cfif>
</CFLOOP>
</CFLOOP>
<cfoutput>
<table align="center" border="1" bordercolor="006699"
cellpadding="0" cellspacing="0" width="500">

<tr bgcolor="006699">

<td>
<font face="Arial,Helvetica,sans-serif" size="-1" color="FFFFFF"><b>After</b></font>
</td>
</tr>
<tr>

<td>

<table border="0" cellpadding="3" cellspacing="0" width="100%">
<tr bgcolor="dddddd">

<td>#MyArray[1][1]#</td>
<td>#MyArray[1][2]# </td>
<td>#MyArray[1][3]#</td>
<td>#MyArray[1][4]# </td>
</tr>
<tr>

<td>#MyArray[2][1]#</td>
<td> #MyArray[2][2]#</td>
<td>#MyArray[2][3]#</td>
<td>#MyArray[2][4]#</td>
</tr>
<tr bgcolor="dddddd">

<td>#MyArray[3][1]#</td>
<td>#MyArray[3][2]#</td>
<td>#MyArray[3][3]#</td>
<td>#MyArray[3][4]# </td>
</tr>
<tr>

<td>#MyArray[4][1]#</td>
<td> #MyArray[4][2]#</td>
<td>#MyArray[4][3]#</td>
<td>#MyArray[4][4]# </td>
</tr>
<tr bgcolor="dddddd">

<td>#MyArray[5][1]# </td>
<td>#MyArray[5][2]#</td>
<td> #MyArray[5][3]# </td>
<td>#MyArray[5][4]# </td>
</tr>
<tr>

<td>#MyArray[6][1]#</td>

<td>#MyArray[6][2]#</td>

<td> #MyArray[6][3]#</td>

<td>#MyArray[6][4]# </td>
</tr>
</table>


</td>
</tr>
</table>
</cfoutput>

<center><a href="../index.cfm">Index</a>
<br>
<hr width="400">
<cfinclude template="../footer.cfm">

</body>
</html>


=============================================================

=============================================================
III. Website: webos.org CF Site
=============================================================

webos.org, webos.com, and Hyperoffice.com

This is what the future will look like Check it out a OS
that runs thru the web. Well at least a simulated OS.

But this one is AWESOME!!!

ps. by the way it was made with ColdFusion!!!

=============================================================
IV. Quick Tip: Cntrl - N and cntrl - Tab
=============================================================

Cntrl-N
Gives you a new document

Cntrl Tab Switches from one document to another open
document.

=============================================================
These Quick Tip are things that the average programmer will
know or I think they will know. Just in case you don't
this is a great place to learn about something that make
your life better.
=============================================================


=============================================================
Copyright (c) 2000 NSND.COM
Permission is granted to circulate this publication via
MANUAL forwarding by email to friends provided that the
text is forwarded in its entirety and no fee is charged.
=============================================================
To unsubscribe:
unsubscribe-cftips @nsnd.com
Remove the Space to make it work correctly
=============================================================
To subscribe:
subscribe-cftips @nsnd.com
Remove the Space to make it work correctly
=============================================================

Photo of Nathan Stanford
Nathan Stanford
LinkedIn

R. Marty Ladner's
Site