relegate colors to css classes, and keep your server-side processing to
a minimum.
<style>
tr.row0{
text-color:black;
background-color:white;
}
tr.row1{
text-color:white;
background-color:black;
}
</style>
<Cfoutput query="display">
<tr class="row#(currentrow MOD 2)#">content</tr>
</cfoutput>
_____
From: Phillip Perry [mailto:[EMAIL PROTECTED]
Sent: Monday, October 11, 2004 1:24 PM
To: CF-Talk
Subject: currentrow is undefined?
Thanks for the info from my last question. Now here is my next issue. I
am
calling for information from 2 tables. I want to find out which row is
even
and which is odd from one of them. I'm using. <cfif
error_table.CurrentRow
MOD 2 IS 1> but this throws an error saying that currentrow is
undefined.
Yet if I take out the error_table. part it works, without ever finding
the
odd and even rows. I'm trying to use this to format the bgcolor and
txtcolor
of a <tr> & <td>. The code is below. How do I fix this error.
<cfquery datasource="#mydbname#" name="display">
SELECT *
FROM error_table, importance
</cfquery>
<cfoutput query="display">
<cfif error_table.CurrentRow MOD 2 IS 1>
<cfset bgcolor="white">
<cfset txtcolor="black">
<cfelse>
<cfset bgcolor="black">
<cfset txtcolor="white">
</cfif>
<tr bgcolor="#bgcolor#" style="text-color:#txtcolor#;">
Thanks for the help
Phil
_____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

