Here's an alternative to the popular IIF() approach:

1. In your global style sheet, define:
oddrow { background-color: #f0f0f0; }
evenrow {  }

2. In your script (or Application.cfm) add:
<CFSET EvenOdd=ListToArray("evenrow,oddrow")>

3. In your query output, do:
<TR CLASS="#EvenOdd(IncrementValue(CurrentRow MOD 2))#">
..
</TR>

-R

-----Original Message-----
From: Tangorre, Michael T. [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 13:31
To: CF-Talk
Subject: alternating rows


Does anyone remember the quick way to alternate row colors when using MOD on
a recorcount?

Mike

______________________________________________________________________
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to