I favor something similar to the following:
<cfscript>
function setRowClass(rowNum) {
result = 'rowAlt';
if (rowNum MOD 2)
result = 'row';
return result;
}
</cfscript>
<cfoutput query="myQuery">
<tr class="#setRowClass(myQuery.CurrentRow)#"....>
<td...></td>
</tr>
</cfoutput>
- Calvin
-----Original Message-----
From: Discover Antartica [mailto:[EMAIL PROTECTED]
Sent: Monday, January 31, 2005 3:51 PM
To: CF-Talk
Subject: How do you change the color of each row?
Hello,
I would like to display the output in such a way that the rows display in
two colors alternatively. I am doing this to make the output more readable.
Is there a way to do it? I think you use IIF function? but I cant remember
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:192453
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