Hi EriKa

what i'd do (OTTOMH - not tested)

Set a temporary val to the number of records to be displayed (countdown)

subtract 1 from current val on each new record

set another temp val to 0 (current record)

add 1 to current val on each new record

use if((currentrecord mod 2 eq 1) and (countdown eq 0)) to find if its a
colspan 2

use if(currentrecord mod 2 eq 0) to find if its the last td in the row.

use if(currentrecord mod 2 eq 1) to find if its the first td in the row.

with a bit more modularisation and slightly diff comparisons you could get
this to display any num of columns correctly...

HTH dan 
-----Original Message-----
From: Erika L. Walker [mailto:[EMAIL PROTECTED]]
Sent: 13 July 2001 19:46
To: CF-Community
Subject: SOT: Dynamic Tables


Hello everyone! I hope this finds everyone in good spirits on a Friday...

I am trying to build a page dynamically...but it's a little complicated..

If you take a look at http://www.medmeet.org/medbroadcast/programStart.cfm

You'll see two parts to a test. (Right now it's just hard coded HTML)

The thing is, programs can have anywhere from 1 part to 4 parts or
more....and the client wants to see the parts laid out in a two colum format
as shown, if there are two parts or more....

Now obviously, if there was only one part, then there would only be one
column.... but three would look like this:

-------------
|     |     |
|     |     |
|     |     |
-------------
|           |
|           |   <--- with this row
|           |        being one column
-------------        (colspan of 2)


So my dilema is, besides being brain-fried, is I know how to build dynamic
tables row by row, but column by column, with dynamic colspans? Anybody ever
have to do this before? Can it be done?

Here's the logic I am thinking of:

If program has more than 1 part
        display two columns
else
        colspan = 2



Loop through this logic if parts is greater than 2?

Am I on the right track?

Sorry to be so absent, I am lurking...keeping an eye on everybody, ....
*** miss you horribly ****

Thanks ever so much,



Erika
(with a *K*)

"Love gives us in a moment what we can hardly attain by effort after years
of toil." - Goethe
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-community@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to