ColdFusion Tutorials ::
Categorized List of ColdFusion TutorialsJQuery Username Check Tutorial
Posted on :: Jan 8
In this tutorial, I'm going to show you how easy it is to create a username check utility directly inside your web-based form, using JQuery & ColdFusion.
Using JQUERY to Detect an End of Session event
Posted on :: Nov 13
With AJAX applications giving us a lot more power than an "old school" web 1.0 page, it isn't unusual for someone to just sit on one page and fire off various operations that use HTTP to fetch and present data. This works fine until you leave the site alone for too long and your session times out. (I'm assuming most folks use a time based session, much like how ColdFusion works.) The question is - what happens in your current AJAX based application when a user's session times out?
There is a solution...
Generating an RSS Feed using CFFEED
Posted on :: Oct 16
This Tutorial Will show you how to generate RSS Feeds from a Database Query and have those feeds made into a Compliant RSS 2.0 Feed Requires ColdFusion 8, will not work on earlier version of Coldfusion.
Optimizing and Backing-up a MySQL Database in Coldfusion
Posted on :: Oct 15
If you're working on databases and want to either Optimize of Backup your Database, you should automatically optize all the list of tables and then back it up.
Flexigrid :: ColdFusion and JQuery
Posted on :: Sep 21
For a great while now I've been attempting to use and or create a JQuery-based Grid System for several projects I'm working on. I've tried many including jqgrid (and could never get jqgrid working for some reason), but I stumbled upon Flexigrid.
Flexigrid is a Lightweight but rich data grid with resizable columns and a scrolling data to match the headers, plus an ability to connect to an xml based data source using Ajax to load the content.
Looping over a Structure (without knowing it's Keys) in ColdFusion
Posted on :: Sep 4
I'm currently in the process of bilding a Dynamic Form Building Application in ColdFusion, and was having issues with getting the values of my Submitted Structure. I wasn't able to read the structure accordingly (becuse I had though originally it was an array, only to fnd through CFDUMP is was being saved as a Strcture).
So I thouht I'd give you this little snipplet of code to help you out, as It did me:
(TWO EXAMPLES AVAILABLE)
SEO URLS with CFScript
Posted on :: Sep 2
This is yet another way to take care of SEO URL rewritting, this one how is encompassed in CFSCRIPT.
It is better to be used with Application.cfc rather than Application.cfm, however I'll cover Application.cfm below.
This CFScript allows you to write urls like:
http://www.yourdomain.com/index.cfm/variable1/value1/variable2/value2
And you can do this seamlessly if you already have traditional links in place, it will not affect:
http://www.yourdomain.com/index.cfm?variable1=value1&variable2=value2
(they are interchangeable)Collecting User Statistics with JavaScript, and ColdFusion
Posted on :: Aug 28
This tutorial shows you how to gather and store user statistics, including Browser, Browser Version, Screen Width, Color Depth, Screen Height, Bit Rate and User Environment. Includes Browser Detection for IPhone, Blackberry, and Android-based mobile devices...
SEO URLS via ColdFusion
Posted on :: Aug 28
In this tutorial, I'm showing you a working method for URL Rewriting using ColdFusion, and a ColdFusion CFC.
You'll be able to have your old urls like: http://yoursite.com/index.cfm?var1=1&var2=2
to be viewed and displayed as: http://yoursite.com/index.cfm/var1/1/var2/2/Using Coldfusion to Import CSV Files
Posted on :: Jul 29
Using Coldfusion to Import data into mySQL
Many times we need a quick and easy way of importing data into our website databases. The CSV file format is one of the defacto standards for moving data between databases easily. Virtually all databases allow exported to CSV format. And virtually all database support importing a CSV formatted file. So why use Coldfusion to do this mundane task? Simply put it is database independant - in this example I created a simple script that reads a CSV file and inserts the records into a matched mySQL table. When I first started looking at this I was surprised that I could find very little of how to achieve this. So now that I have it worked out I thought I could share this little piece...
Lets set the stage:
Passing JavaScript Values to Coldfusion
Posted on :: Jul 21
Is it possible to pass JavaScript Values to ColdFusion? Not directly no, as JavaScript is a Client side Language and ColdFusion is a Server-side Language. It can be done, however not without refreshhing your Page and.or Form.
This tutorial will show you one possible method of sending a JavaScript variable to coldfusion via using the url.
Creating Stand-Alone ColdFusion Templates With Embedded Images
Posted on :: Apr 29
This isn't as cool as perhaps it sounds, but it's kind of neat! Here's the Scenario:
You (or the project you're working on) don't want images on it to have to be stored in the standard file system. This makes the page extremely modular so that I can just drop it in and not worry about taking it out later.Relative Custom Tag Paths: Friend or Foe?
Posted on :: Apr 29
ColdFusion 8 added support for this.mappings and this.customTagPaths as per-application settings in Application.cfc, something many developers including yours truly will tell you was a god-send.
But did you know that they can be relative?
I stumbled on this — uh, feature? — and I'm still undecided on whether I like it or not.
Using GMAIL for your ColdFusion Server's SMTP
Posted on :: Apr 28
I had discovered that is is possible to use Google's GMAIL smtp server to server your ColdFusion Server Mail system. Really.
It's not a complicated as one would think.Automatically Adding Smiles To Your Messages
Posted on :: Apr 23
This tutorial will demonstrate how you can implement smiley's into your pages on the fly.
An Introduction to CFSCRIPT
Posted on :: Apr 23
We all know and love ColdFusion for its easy to use tag-based syntax. So why is there even a cfscript-style syntax? Well, there are a couple of reasons:
Some CFers are already proficient in other langauges, and may feel more comfortable writing program events in a more 'traditional' method.Some people think that cfscript style syntax is easier to read (more straightforward).
CFSCRIPT exectues faster than a comparable block of tag-based code
So what does all of this mean to you? Do you have to use cfscript? Absolutely not. But given the advanatges mentioned above (as well as the ability to more easily write User-Defined Functions in CF 5 and above), you may want to check out cfscript to see what it can do for you.(x)html Compliant Dynamic Columns Display
Posted on :: Apr 23
There's always alot of methods for displaying a Table's rows and Columns, dynamically, however this tutorial will show yu how to do it with XHTML Complaince.
Configuring CF8 to use Google Apps
Posted on :: Apr 21
The biggest issue I have with running my own server is dealing with spam blockers, email servers, DNS servers, etc. For some of you this is easy, and a no brainer. I personally run from it like a screaming banshee. I use google hosted services for all my email needs. They make it easy, rarely ever have downtime, and the spam filtering is second to none!
Google works fine for sending email from my desktop mail client or through the web, but sending mail via scripts programatically has always been a pain in the butt in my experience. That is until today.
IPhone Detection Scripts
Posted on :: Mar 31
With iPhones being all the rage these days, I am wondering if mobile versions of your pages might be useful. Viewing a site on an iPhone looks exactly as it does on your desktop. This is all well and good, but sometimes pages can be bloated with images, javascript libraries, and other markup that is not as important to your visitors. I am also a bit upset that the iPhone ignores the css media type of handheld. I wish there were an option to force Safari to render handheld styles as default, but I could not find any option for it. So I set out on a quest to find some alternatives for my iPhone experience.
Creat a ColdFusion collection with the cfcollection tag
Posted on :: Mar 31
On occasion a developer may not have access to ColdFusion Administrator, for
example, if you use a virtual hosting company. If you want your ColdFusion
application to be able to create, delete, and maintain a collection you will
need to use the cfcollection tag. The following will show you how to create a
collection index it then index it to include a MS Access database this code
works great for use with a serch function for your shopping cart site. You will
need to create an Access database with a table named Products and you will need
the following fields ItemID, ProductID, ProductName, BriefDescription, Details.Using ColdFusion's CFDBInfo to Dynamically Output Database Columns and Tables
Posted on :: Mar 23
The ColdFusion tag CFDBInfo was introduced in ColdFusion 8. I finally got around to playing with it and thought someone other than me might find this useful. I was thinking of using it for creating a dynamic SQL dump for some of my projects I'm currently writting, and thought I should share it with the world.
There are a ton of uses for this excellent CF Tag, and I've included a few samples below.
Creating PDFs that automatically print via CFPDF and DDXCreating PDFs that automatically print via CFPDF and DDX
Posted on :: Mar 23
Here's the situation. A user is viewing a report online. The business owner of the application decided to provide a nice PDF format of the data, all the user needs to do is click a button, perhaps named "print". The CF server generates the PDF, hands it off to the browser through either CFLOCATION or CFCONTENT. So now the user has the PDF loaded in a secondary window and have to go hunt for the print button again. But fear not, dear user! We'll save you by judicious use of XML, Javascript, and ColdFusion.
URL Rewritting in Coldfusion
Posted on :: Mar 12
In my endeavors to optimize the projects and sites I've worked on, I developed a simple snipplet of code that will easily adapt your long urls into an easier to remeber and easier to use method.
File upload gotcha: PDFs get different mime types per browser
Posted on :: Mar 11
When you upload a PDF in IE, the file you receive has what I believe is the correct mime type: "application/pdf" however when you upload the same PDF file using the same code, in Firefox (tested in FF 2 and 3), the mime type is "application/download". I can't explain it. I have no idea why it's wrong. But it is, and consistently so. Could this be the one thing that is implemented correctly in IE and incorrectly in Firefox?
Easily Cache the Return Value of Any Function
Posted on :: Mar 9
Work in web development long enough, and you'll run into caching. When done appropriately, it can be a real life saver. In CFML, we have several caching tools at our disposal.
The built in cfcache function will cache an entire page, and there are a bunch of projects on RIA Forge (search for "cache") that deal with caching of whole pages, partial pages, and specific data; and use various methods from memcached to underlying java caching. And of course, you can always roll your own cache using a persistent scope (application, session, client, or cookie) and some date comparison.
After about the 100th time of rolling my own custom caching, I decided it was time to wrap it up in a nice little UDF.
ColdFusion Export to Excel
Posted on :: Mar 7
Catch dynamically created form values
Posted on :: Feb 13
When you dynamically create a list of form elements it is sometimes hard to catch the values of those forms to use for database insertion. This tutorial describes how you can do this.
E-Commerce in ColdFusion
Posted on :: Feb 12
This tutorial uses arrays and structures to develop a shopping cart system. This tutorial also contains web-front order processing (e-commerce) information that most of you will probably find very helpful alongside the shopping cart.
This tutorial comes from an eclectic group of sources. I utilized Macromedia's LiveDoc's, CJ's tutorials, as well as many other tutorial information when I first built a full shopping cart system. With that in mind, some of my coding may seem familiar from elsewhere, and I want to acknowledge that I took parts of my coding from other sources when I initially wrote all of this coding. At this point I cannot cite exactly which parts are from elsewhere, but just know that some parts are.
Additionally, this tutorial utilizes a processing system in which people who shop must sign up as members. The coding is written so it is not a nuisance for customers to sign up as they check out. The code should be easily understood and editable so customers do not have to sign up before purchasing. I did this because I have found it more convenient for customers to store their information, and its more secure as it only uses one address for both billing and shipping.Dynamically Generating HTML Table Columns & Rows
Posted on :: Feb 12
I've written this tutorial, because I had a need to do exactly what the title suggests. I needed to dynamically generate a table with Columns and Rows, based off of a CFQUERY results. Well, this is the fruit of my labors, and I hope it assists others as well.
Displaying Tag Restrictions on ColdFusion Server
Posted on :: Feb 12
Please Note: This Tutorial is for Cold Fusion running on Windows.
One thing that always got to me was that on shared coldfusion hosting, you wouldn't know what restricitons are on the server until you try to run a chuink of code, like <Cfdirectory> and get an error. Well I've written this tutorial to assist you in ascertaining which tags are permitted and which aren't.
Creating IIS Virtual Directories with Coldfusion 8 and .NET
Posted on :: Feb 10
Ever had a need to automate the creation of virtual directories in IIS? Coldfusion 8 can do this quite well using the System.DirectoryServices.DirectoryEntry class in the .NET framework.