<cfoutput>
<cfloop index="listrow" list="#logfile#" delimiters="#chr(10)#">

    <cfset variables.thisRowNumber = IncrementValue(variables.thisRowNumber)> 

        <tr bgcolor="#IIF(variables.thisRowNumber MOD 
2,DE('#CCCCCC'),DE('#ABABAB'))#"> 
        <cfloop index="thiscol" list="#listrow#" 
delimiters="#chr(10)#,#chr(9)#,' ','=',';'">
                        <td>thiscol#</td>
        </cfloop>
        </tr>
</cfloop>
</cfoutput>



Is this specific to certain version of CF? I'm using CF5. It doesn't like the 
single quotes?



Error Occurred While Processing Request
Error Diagnostic Information
Just in time compilation error

Invalid parser construct found on line 75 at position 61. ColdFusion was 
looking at the following text:

'
Invalid expression format. The usual cause is an error in the expression 
structure.
The last successfully parsed CFML construct was static text occupying document 
position (73:78) to (75:14
 




> Ed Wong wrote:
> 
> >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?
> >  
> >
> [snip]
> 
> ><tr bgcolor="<cfoutput>#bgColor(currentRow MOD 2,'##CCCCCC',
> '##ABABAB')#</cfoutput>">
> >  
> >
> You don't need the function, just use a CFIF or an inline IF as I 
> mentioned in another post today.
> 
> <tr bgcolor="#IIF(currentrow MOD 2,DE('#CCCCCC'),DE('#ABABAB'))#">
> 
> However, currentrow is an attribute of a query, so what you need to do 
> 
> is keep a count of the current row as you loop through your list.
> 
> <cfset variables.thisRowNumber = 0>
> <cfloop index="listrow" list="#logfile#" delimiter="#chr(10)#">
>       <cfset variables.thisRowNumber = IncrementValue(variables.
> thisRowNumber)>
>       <tr bgcolor="#IIF(variables.thisRowNumber MOD 2,DE('#CCCCCC'),
> DE('#ABABAB'))#">
>       .
>       .
>       .
> </cfloop>
> 
> I'm not sure where your CFOUTPUT is, but you will need one around the 
> 
> anywhere you want to output variables etc.
> 
> Regards
> 
> Stephen

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:15:926
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

Reply via email to