Back in 1998 I picked up this method - originally by Rob Bilson and Mike Van Hoozer (I don't have the original site listed, sorry)
<CFQUERY name="Get Results" datasource="CNet">
SELECT * FROM CustomerRecords
</CFQUERY>
<TABLE>
<CFOUTPUT query="GetResults">
<CFIF (CurrentRow MOD 2) IS 1>
<!--- a row using first color --->
<TR>
<TD bgcolor="##FFCC99">#CustomerName#</TD>
<TD bgcolor="##FFCC99">#State#</TD>
</TR>
<CFELSE>
<!--- a row using the second color --->
<TR>
<TD bgcolor="##EFD6C6">#CustomerName#</TD>
<TD bgcolor="##EFD6C6">#State#</TD>
</TR>
</CFIF>
</CFOUTPUT>
</TABLE>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.