faqts : Computers : Programming : Languages : ColdFusion

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 2 people (100%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

How can I do alternating colors like green bar paper on my output?

Apr 13th, 2004 06:41
Nathan Stanford, http://www.cftipsplus.com/cftips.cfm?issueid=1


http://www.cftipsplus.com/cftips.cfm?issueid=1
I. ColdFusion Code: Output Text in 2,3,4,... Rows
You can just modifiy the number 2 after the MOD and change 
the Xquery to whatever your query name is and of course 
the var to your own var.
<table>
<tr>
<cfoutput query="Xquery">
<td>#var#</td>
<cfif Xquery.CurrentRow MOD 2 IS 0>
</tr>
<tr>
</cfif>
</cfoutput>
</tr>
</table>