I usually use a counter variable, or a cfoutput/grouping, when possible,
and just incrememn

<CFSET CurrentVal="">
<CFSET Counter=0>
<CFOUTPUT/CFLOOP over Query >
<CFIF CurrentVal NEQ Query.Val>
        <CFSET CurrentVal=Query.Val>
        <CFSET Counter=Counter+1>
        <Cfset currentBG=iif(counter MOD 2 is
0,de("DDDDDD"),de("FFFFFF"))>
</cfif>

OUTPUT ROWS using #currentBG#
</CFLOOP/CFQUERY>

-----Original Message-----
From: Les Mizzell [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 28, 2005 4:44 PM
To: CF-Talk
Subject: Alternating Row Colour - Sorta

Here's the page in question:

http://www.stpaulscolumbia.com/calendar.cfm

Client is asking for alternating colors for DAYS - not rows.

At first, I figured, OK, Odd Dates one colour, Even Dates another.
Nope, don't work because there may be something on the 5th and 7th, both
odd dates - but not the 6th ... and then you'd get two groups of events
- those on the 5th and 7th, the same colour.

I'm looking at various convoluted ideas for this, but bet the list can
comeup with something a little more compact than I...

Ideas?

--
-----------
Les Mizzell



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200283
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to