The i-Technology Media!
Register | Log in
   
 
.NET  ·  AJAX  ·  CLOUD  ·  ECLIPSE  ·  FLEX  ·  OPEN WEB  ·  iPHONE  ·  JAVA  ·  LINUX  ·  OPEN SOURCE  ·  ORACLE  ·  PBDJ  ·  SEARCH  ·  SILVERLIGHT  ·  SOA  ·  VIRTUALIZATION  ·  WEB 2.0  ·  WIRELESS  ·  XML
Comments
Drool, Britannia? Is the UK Failing the Cloud?
By Roger Strukhoff
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Jan. 8, 2012 11:38 AM EST
read more & respond »
Cloud Expo on Google News
Did you read today's front page stories & breaking news?

Cloud Expo & Virtualization 2011 West
Keynotes
Oracle
Opening Keynote | An Enterprise Cloud for Business-Critical Applications
Abiquo
Day 2 Keynote | The Enterprise Cloud Tightrope - Balancing for Success
Akamai
Day 3 Keynote | The DNA of an Enterprise Cloud
DIAMOND SPONSOR:
Oracle
Many Clouds, Many Choices'Cloud
PLATINUM PLUS SPONSORS:
Abiquo
Enterprise Cloud Best Practices - Town Hall - Join the discussion…
PLATINUM SPONSORS:
Intel
Progressing Toward the Federated, Automated and Client-Aware Cloud
New Relic
How to build an app with Twitter-like throughput
Rackspace
Computing in the Cloud Era
GOLD SPONSORS:
Gale Technologies
Practical Cloud Migration
IBM
Re-think IT. Re-inventing Business.
Intel/McAfee
Identity Driven Security in the Cloud
PerspecSys
Hackers Hackers Everywhere, Is My Public Cloud That Safe?
Red Hat
Unlock the Value of the Cloud
SHI
Mission Critical Applications and the Cloud - Myth or Reality?
SoftLayer
Not Your Grandpa's Cloud
Terremark
Integrating Enterprise Clouds
VMware
Upgrade to a vCloud
POWER PANELS:
Cloud Expo Silicon Valley: CTO Power Panel
Cloud Expo Silicon Valley: CEO Power Panel
Cloud Expo Silicon Valley: Cloud SuperStars Panel
Cloud Expo Silicon Valley: CloudNOW Panel
Click For 2010 West
Event Webcasts
Cloud Expo & Virtualization 2011 East
DIAMOND SPONSOR:
Dell
Dell & VMware Deliver the Enterprise Hybrid Cloud
PLATINUM PLUS SPONSORS:
Abiquo
Are Financial Services Organizations Risking Security by Avoiding Cloud Computing?
Oracle
From Consolidation to Enterprise Private PaaS
PLATINUM SPONSORS:
Intel
Driving the Transformation to Next Generation Cloud Data Centers
Rackspace
The Inevitability of an Open Cloud
GOLD SPONSORS:
CA Technologies
Follow YOUR path to Cloud Computing
Interxion
Who Keeps the Cloud in the Air?
Microsoft
Patterns for Cloud Computing
PerspecSys
War in the Clouds: Are you ready?
ServiceMesh
The Big Win: Stop Playing Small-Ball with Your Cloud Strategy
Terremark
Evaluating Enterprise Clouds
Xiotech
Cloud Storage: Myths and Realities
POWER PANELS:
Cloud Expo New York: CTO Power Panel
Cloud Expo New York: CEO Power Panel
Cloud Expo New York: CMO Power Panel
Cloud Expo New York: Wrap-Up Power Panel
Click For 2010 West
Event Webcasts
Live Google News by SYS-CON!
Top Three Links You Must Click On


CF Tips & Techniques
Creating Multi-Column Lists
Creating Multi-Column Lists

By: Joe Copley
Sep. 17, 2003 12:00 AM

When you have a long list to display, it often makes sense to break the list up into columns. If you display your list using tables, a simple CFIF tag is all it takes.

<CFQUERY name="getlist" datasource="mydb">
        SELECT listitem FROM list
</CFQUERY>
<CFSET numcols=3>
<table>
   <tr>
      <CFOUTPUT query="getlist">
      <td>#listitem#</td>
         <CFIF getlist.currentrow/numcols IS 
                  int(getlist.currentrow/numcols)>
            </tr><tr>
         </CFIF>
      </CFOUTPUT>
   </tr>
</table>

The code above creates a three-column table. You can set the numcols variable to any desired integer, or calculate it based on the number of items in the list.

This technique displays items in horizontal sequence. To list items vertically, use a slightly different technique:

<CFSET numrows=int(getlist.recordcount/numcols)>
<table>
   <tr><td>
      <CFOUTPUT query="getlist">
      #listitem#
            <CFIF getlist.currentrow/numrows IS 
                     int(getlist.currentrow/numrows)>
               </td><td>
            <CFELSE>
               <br>
            </CFIF>
      </CFOUTPUT>
   </td></tr>
</table>

This last method creates an extra table cell, which you can suppress if needed.

Joe Copley is president of Copley Internet Systems. He can be reached at joe@copleyinternet.com.

Order Form Feedback
By Dmitriy Shlosberg

Sometimes you need to create a feedback/order form that you do not have time to create, or you want your users to be able to create forms and you don't have time to train them. In such cases, you can write a standard script that takes all the fields from your form and mails them. Users will only have to deal with the form itself.

Below is the sample file, named mailrequest.cfm, which takes all the fields from a form and mails them out. View the source code to see how to use this script. In the beginning, you should have something that looks like this:

<FORM METHOD="post" ACTION="mailrequest.cfm">
<input type=hidden name="from" value="me@domain.com">
<input type=hidden name="to" value="recipient@domain.com">
<input type=hidden name="subject" value="Feedback-form">
<input type=hidden name="route" value="confirm.htm">
<input type=hidden name="fields"
     value="name,address,city,state,zip,phone,country">
<input type=hidden name="LOG_FILE" value="c:\logs\reglog.log">
The fields speak for themselves. Just fill out the values you need for these fields. The mailrequest.cfm script is a common script that should never be modified. Cut and paste the script below:


<!--- common script to mail a form 
Written by Dmitriy Shlosberg (dshlos@home.com)
Copyright (c)1997-1998, RAMS-FIE, Inc.
--->

<cfset #text#="">
<cfloop index=index1 list="#FORM.required_fields#">
   <cfif #Evaluate("#index1#")# is "">
      <cflocation url="#FORM.error_location#?field=#index1#">
   </cfif>
</cfloop>
<cfloop index=index1 list="#FORM.fields#">
   <cfset #text#= #text# & "#index1#" & ": " & 
      #Evaluate("#index1#")# & chr(13) & chr(10)>
</cfloop>

<cfset #text#= #text# & chr(13) & chr(10) & "Host Name:" & 
   #CGI.REMOTE_HOST#>
<cfset #text#= #text# & chr(13) & chr(10) & "Host IP:" & 
   #CGI.REMOTE_ADDR#>
<cfset #text#= #text# & chr(13) & chr(10) & "Submission Date/Time:" & 
   #Now()#>

<cfset #text#= #text# & chr(13) & chr(10) & chr(13) & chr(10)>

<cfmail from="#FORM.from#"
   to="#FORM.to#"
   subject="#FORM.subject#">
#text#
</cfmail>

<!--- save this into a file --->

<!--- the filename should be specified in the LOG_FILE form field --->

<cfset #savevar#= "Sent to: " & #FORM.to# & chr(13) & chr(10) & 
   #text#>

<cfif #ParameterExists(FORM.LOG_FILE)# is "Yes">
   <cffile action="append"
      file="#FORM.LOG_FILE#"
      output="#savevar#">
</cfif>

<cflocation url="#FORM.route#">

Contact Dmitriy Shlosberg at (dshlos@home.com)

Published Sep. 17, 2003— Reads 1,067
Copyright © 2003 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
About Joe Copley
Joe Copley is president of Copley Internet Systems.

Add Your Feedback

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers

ADS BY GOOGLE

Breaking Java News
SEACOR Holdings Announces Results for the Fourth Quarter and Year Ended December 31, 2011
Federated Enhanced Treasury Income Fund Announces Share Repurchase Program
New Jersey Community Bank Promotes Naqi "Nick" A. Naqvi to Executive Vice President
ROTH Capital Partners to Feature China Track at 24th Annual Growth Stock Conference March 11–14, 2012
Franklin Universal Trust Declares Monthly Dividend
Franklin Templeton Limited Duration Income Trust Declares Monthly Dividend
Hanley Wood Hires Bob Benz as New President of Content
Prostate Cancer Treatment Options Go Head-to-Head
Arcanum Global Hires Former Israeli Intelligence Chief Dagan
First Midwest Bank Awards $5,000 to Amphitheatre Grand Prize Winner

ADVERTISE   |   MAGAZINE SUBSCRIPTIONS   |   FREE BREAKING-NEWSLETTERS!   |   SYS-CON.TV   |   BLOG-N-PLAY!   |   WEBCAST   |   EDUCATION   |   RESEARCH

.NET Developer's Journal - .NETDJ   |   ColdFusion Developer's Journal - CFDJ   |   Eclipse Developer's Journal - EDJ   |   Enterprise Open Source Magazine - EOS
Open Web Developer's Journal - OPENWEB   |   iPhone Developer's Journal - iPHONE   |   Virtualization - Virtualization   |   Java Developer's Journal - JDJ   |   Linux.SYS-CON.com
PowerBuilder Developer's Journal - PBDJ   |   SEO / SEM Journal - SJ   |   SOAWorld Magazine - SOAWM   |   IT Solutions Guide - ITSG   |   Symbian Developer's Journal - SDJ
WebLogic Developer's Journal - WLDJ   |   WebSphere Journal - WJ   |   Wireless Business & Technology - WBT   |   XML-Journal - XMLJ   |   Internet Video - iTV
Flex Developer's Journal - Flex   |   AJAXWorld Magazine - AWM   |   Silverlight Developer's Journal - SLDJ   |   PHP.SYS-CON.com   |   Web 2.0 Journal - WEB2
Apache   |   CMS   |   CRM   |   HP   |   Oracle Journal   |   Perl   |   Python   |   Red Hat   |   Ruby on Rails   |   SAP   |   SaaS

SYS-CON MEDIA:   ABOUT US   |   CONTACT US   |   COMPANY NEWS   |   CAREERS   |   SITE MAP
SYS-CON EVENTS:   |  AJAXWorld Conference & Expo  |  iPhone Developer Summit  |  Cloud Computing Conference & Expo  |  SOA World Conference & Expo  |  Virtualization Conference & Expo
INTERNATIONAL SITES:   India  |  U.K.  |  Canada  |  Germany  |  France  |  Australia  |  Italy  |  Spain  |  Netherlands  |  Brazil  |  Belgium
 Terms of Use & Our Privacy Statement     About Newsfeeds / Video Feeds
Copyright ©1994-2008 SYS-CON Publications, Inc. All Rights Reserved. All marks are trademarks of SYS-CON Media.
Reproduction in whole or in part in any form or medium without express written permission of SYS-CON Publications, Inc. is prohibited.
 
close this window