Now that is shit hot, excuse my French....
Here I was thinking an "iif" would be the best and quickest, but I bet yours
would run quicker as there is no need to perform a decision statement.

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf 
> Of lists.daemon.com.au
> Sent: Wednesday, 12 November 2003 8:39 PM
> To: CFAussie Mailing List
> Subject: [cfaussie] Re: Coding Preference
> 
> 
> How about this...
> 
> In Application.cfm or elsewhere
> <cfset classes = ArrayNew(1) >
> <cfset classes[1] = "darkRow" >
> <cfset classes[2] = "lightRow" >
> 
> 
> <tr class="#classes[q.currentRow mod 2 +1]#" >
> 
> Saves you putting the <cfif> inside your your <tr> tag. This 
> could be alot neater CF had zero-based arrays.
> 
> Pat
> 
> 
> "Peter Galipo" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
>
> Hi All,
>
> I'm just wondering if this is the way to go or do people out there 
> write this code differently?
>
> <tr <cfif q.currentrow MOD
> 2>class="lightRowCol"<cfelse>class="darkRowCol"</cfif>>
>
> Thanks,
>
> Pete
>
>



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To
unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to