Horizontal Loop

Many of you may have had a time when you have wanted to output from a query in a grid format.

This script will enable you to loop through the results horizontally, across the screen

Here is a demo of the result

The first thing that we need to do it to query a database

<cfquery datasource="loop" name="items">
SELECT *
FROM table
</cfquery>

Now that we have the data we can decide how many columns we would like across the screen in this example i will have 5. I will set a variable to that after every 5th result i will start a new line.

<cfset multiple = 5>

We will now create a table to output the data into. within this table we will repeat the <td> tag and after every 5th result output </tr><tr> to end the line and start a new one. we will then increase the count for the end of the next row.

<table width="300" border="0" cellspacing="1" cellpadding="1">
<tr>
<cfoutput query="items">
<td#items.name#</td>
<cfif CurrentRow eq multiple>
</tr><tr>
<cfset multiple = multiple + 5>
</cfif>
</cfoutput>
</tr>
</table>

Here is the full script for you

<cfquery datasource="loop" name="items">
SELECT *
FROM table
</cfquery>
<cfset multiple = 5>
<table width="300" border="0" cellspacing="1" cellpadding="1">
<tr>
<cfoutput query="items">
<td>#items.name#</td>
<cfif CurrentRow eq multiple>
</tr><tr>
<cfset multiple = multiple + 5>
</cfif>
</cfoutput>
</tr>
</table>

Enjoy

Overlaying 2 Images

In this tutorial i will show you how to over lay one image onto another using coldfusions built-in image functions, this method can be used to add a walter mark to an image.

[More]

Hashing Passwords

After being criticized for my last post about 2 way encryption of passwords i have decided to write a post about hashing your passwords. As was pointed out in my last post this is a more secure way of keeping your password data safe.

[More]

Encrypting Passwords

In this tutorial i will show you how you can easily encrypt and decrypt passwords using coldfusion

[More]

Coldfusion Login Script

Here i am going to show you how to make a login script that will check users against a database for the user name and password.

First of all we will need to make a login form, this is just going to be a basic form with a user name field, password field and a login button.

[More]

Simple Contact Form With JavaScript Validation

This is a very simple contact form script with JavaScript validation.

This form has three fields name, email address and message but can be easily modified with new fields.

Here is an example of the contact form

I hope to see some examples of what you do with this script. Like Mark Ireland has done with my previous Simple JavaScript Calculator script.

[More]

Simple JavaScript Calculator

Here i have a very simple script for a JavaScript calculator

It is a pretty basic script that uses a text field to create the equation with the buttons and then equates the equation to show you the answer.

There is also a Memory Store (MS), Memory Recall (MR), and a Memory Clear (MC). For those of you that may require it

[More]

CF8 Rich Text Editor

Many of you may not know that CF8 has a built-in Rich Text Editor.

It is actually very easy to use this script, all you need is to have a cfform with a cftextarea.

[More]

CAPTCHA Script

In this tutorial i will show you have to create and implement a CAPTCHA script into a form to validate that a person is using you site rather than a bot. This is a good script that can be used on forums and contact forms to eliminate SPAM on your site.

[More]

Coldfusion Protx VSP Form Integration Kit

Do you have a Coldfusion site and wish to integrate it with the Protx payment system? If so then this is the best script for you, by using the VSP Form you do not require SSL encryption because all sensitive details are collected on a Protx secure server.

[More]

More Entries

Archives By Subject

Advertising (3) [RSS]
Blog Design (1) [RSS]
CFProject Scripts (2) [RSS]
Coldfusion Charts (3) [RSS]
Coldfusion Functions (5) [RSS]
Coldfusion Overview (1) [RSS]
Coldfusion Tutorials (16) [RSS]
Image Manipulation (1) [RSS]
JavaScript (3) [RSS]
Useful Tools (3) [RSS]

Recent Comments

FCKeditor
Jonny Shaw said: I know that but unless you can get the new version on FCKeditor in to CF8 then i will keep using FCK... [More]

FCKeditor
Azadi Saryev said: Jonny, their ARE the same. CF8 just uses an earlier version of FCKEditor, so, of course, there are d... [More]

FCKeditor
Jonny Shaw said: There are a few differences between the two, i got annoyed with the CF8 editor because it tries to b... [More]

FCKeditor
Shannon Hicks said: Yeah, from the CF8 docs: Using the rich text editor The ColdFusion rich text editor lets users ente... [More]

FCKeditor
Henry Ho said: Ya.. YUI Editor also == FCKEditor [More]

Recent Entries

Customizable Homepage
Horizontal Loop
FCKeditor
Coldfusion Blog | Coldfusion Hosting | About Me