the only other thing you could add, just in case there is
an odd number of rows, you would want to protect against that so
that your table was correct in its format and you didnt have a hanging
</td> there with no </tr> at the end, would be, hmmm, not sure
too late, and no time to think about it...but im sure someone could...


later :)


tw

-----Original Message-----
From: Tony Weeg [mailto:[EMAIL PROTECTED]
Sent: Friday, October 17, 2003 12:05 AM
To: CF-Talk
Subject: RE: Goofy Rows Questions

hello eric.

do this.

in your looping, check to see if the queryname.currentRow mod 2
and if so, add a <tr> and start a new row.

<table>
    <tr>
        <cfloop query = "yourQuery">
            <td></td>
            <cfif yourQuery.currentRow mod 2>
                </tr>
            <cfelse>
                <td></td>
            </cfif>
    </cfloop>
</table>

this should work like a charm, closing the row if its the second one,
making another cell if its not the second one.
and if you wanted to make three of them, just make it mod 3, and so on.

hth
tony

-----Original Message-----
From: Eric Hoffman [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 11:53 PM
To: CF-Talk
Subject: Goofy Rows Questions

This is elementary I am sure, but brain is fried out...

I have some records that need to be displayed left to right, 2 columns
per
row...

So,   
Column 1    Column 2
(record 1) (record 2)
(record 3)  (record 4)

How do I do something this simple?  All the monkey business I am
figuring
out does one long column.  *sigh*  Why don't they make Jolt cola
anymore???!

Regards,

Eric J. Hoffman
DataStream Connexion
www.datastreamconnexion.com

  _____  

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to