Nate, 

No need to use the Evaluate() function--it'll just slow you down:
BGCOLOR="#stColor[QueryName.CurrentRow MOD 2]#"

-Dan

> -----Original Message-----
> From: Nate Smith [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 21, 2001 3:17 PM
> To: CF-Talk
> Subject: RE: Alternating BG colors on a <TD>
> 
> By using the mod function on queryname.CurrentRow.
> 
> Create this struct to hold your two color values.
> <CFSCRIPT>
>       stColor = STRUCTNEW();
>       stColor[0] = '##FFFFFF';
>       stColor[1] = '##CCCCCC';
> </CFSCRIPT>
> 
> Then place this code inside of each td:
> BGCOLOR="#EVALUATE("stColor[QueryName.CurrentRow MOD 2]")#"
> 
> -
> Nate Smith,
> Lead Developer
> Macromedia Coldfusion 5 Certified Professional
> Macromedia Certified Web Site Developer
> [EMAIL PROTECTED]
> www.doceus.com
> 
> 
> 
> -----Original Message-----
> From: Chad Gray [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 21, 2001 2:39 PM
> To: CF-Talk
> Subject: Alternating BG colors on a <TD>
> 
> 
> I have done this in the past, but cant remember how i did it.
> 
> When using a <CFOUTPUT QUERY=""> tag on a table how do i get every
other
> <TD> to have a background color?
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.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