I tried to add different colours to the <TR> but keep getting an error. Can't I
do this with a CFLOOP or do I need to do a <cfloop query?
Code snippet below:
<cfscript>
function BGCOLOR(expression,color1,color2) {
if (expression) {
return color1;
} else {
return color2;
}
}
</cfscript>
<tr bgcolor="<cfoutput>#bgColor(currentRow MOD
2,'##CCCCCC','##ABABAB')#</cfoutput>">
Error below:
Error Occurred While Processing Request
Error Diagnostic Information
An error occurred while evaluating the expression:
#bgColor(currentRow MOD 2,'##DBDBDB','##BEBEBE')#
Error near line 69, column 26.
--------------------------------------------------------------------------------
Error resolving parameter CURRENTROW
ColdFusion was unable to determine the value of the parameter. This problem is
very likely due to the fact that either:
You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.
The error occurred while processing an element with a general identifier of
(#bgColor(currentRow MOD 2,'##DBDBDB','##BEBEBE')#), occupying document
position (69:25) to (69:73)
>Ed,
>
>I'm assuming that your in your log file each entry is delimited by a
>linefeed (chr(10)) and each column in each row is delmited by a TAB
>character (chr(9))
>
>If thats the case, then :
>
><table>
><cfloop index="listrow" list="#logfile#" delimiter="#chr(10)#">
> <tr>
> <cfloop index="thiscol" list="#listrow#" delimiter="#chr(9)#">
> <td><cfoutput>#thiscol#</cfoutput></td>
> </cfloop>
> </tr>
></cfloop>
></table>
>
>will create a list out of your log file using the LF as a row delimiter
>and then loop throw each row splitting the row into columns using the
>TAB delimiter.
>
>Regards
>
>Stephen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase Flash MX Pro from House of Fusion, a Macromedia Authorized Affiliate
and support the CF community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=57
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:922
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54