Here's an idea for ya if you know for sure the story will be three columns:
Using Left(), Mid(), and Len()
1. Put your story in a variable and get the length of the variable
<cfset somevar = "yourstory goes right here">
<cfset somevar_count = LEN(somevar)>
2. Since you have already decided to divide the story into 3 columns...then
do just that.
<cfset count_divided = somevar_count / 3>
3. Find a space close to the first division
<cfset col_count = Find(" ", somevar, count_divided)>
4. Set up your tables and then for each column do the following:
Column 1
#Left(somevar, col_count)#
Column 2
#Mid(somevar, col_count , Find(" ", somevar, col_count))#
Column 3
#Mid(somevar, (col_count * 2), col_count)#
Of course you will most likely need to tweak this and I would suggest
changing the variables to something applicable. But you could really go all
out and make the column selection dynamic based on how long the story
is....the possibilities are endless.
Also, check out the IHT for a good implementation of multi-column formating:
http://www.iht.com
Have a good one!
Ryan Kime
[EMAIL PROTECTED]
Web Developer
Webco Industries
-----Original Message-----
From: Justin Hansen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 25, 2002 2:21 PM
To: CF-Talk
Subject: 3 column output
Ok, here is a good one for ya. I have a database of stories and they want to
display it in the browser as a 3 column, "newspaper style" display. How does
the all mighty group think this could be accomplished. How could one get a
story to wrap from Column 1 to 2 and 3 with HTML Tables? Is this type of
linked tables available in Flash MX?
Anyone... Anyone....
Justin Hansen
--------------------------
Uhlig Communications
Systems Engineer
--------------------------
[EMAIL PROTECTED]
913-754-4273
--------------------------
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists