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.
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:
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:
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#">