Sorry for dropping in on this thread, but what you've said isn't strictly
true.... although a little pedantic, the correct way of specifying colours
in HTML is to put a # in front of the colour code, for example, #FFFFFF or
#99CCFF, so the first output statement that you listed is actually correct,
as the # is being added before the colour code is written to the
page. The result would be <tr bgcolor="#ffffff"> OR <tr bgcolor="#99ccff">.
I've used this method in the past ....
<TR BGCOLOR="#<CFIF CurrentRow MOD 2 = 0>FFFFFF<CFELSE>99CCFF</CFIF>">
...., no need for a CFOUTPUT, or to make function calls to IIF or DE.
It would be interesting to see what the processing difference would be,
over a big table, of the single CFIF vs CFOUTPUT, IIF and DE methods. Back
a few years ago when I went through a VB programming stint, I remember that
IIF had a performance overhead, and we were recommended to use it as little
as possible.
At 11:24 24/05/00 -0400, you wrote:
>Vance,
>
>have a look at your output statements,
><tr bgcolor="#<cfoutput>#IIf(CurrentRow Mod 2, DE('ffffff'),
>DE('99ccff'))#</cfoutput>">
>
>You've got the open cfoutput tag in the wrong place it should be:
> <TR bgcolor="<cfoutput>#IIf(CurrentRow Mod 2, DE('ffffff'),
> DE('C0C0C0'))#</cfoutput>">
>
>HTH,
>larry
>--
>Larry C. Lyons
>EBStor.com
>8870 Rixlew Lane, Suite 201
>Manassas, Virginia 20109-3795
>tel: (703) 393-7930 x253
>fax: (703) 393-2659
>http://www.ebstor.com
>http://www.pacel.com
>email: [EMAIL PROTECTED]
>Chaos, panic, and disorder - my work here is done.
>--
>
>Vance Duke wrote:
>
> > Agreed. Here is what the code should look like.
> >
> > <tr bgcolor="#<cfoutput>#IIf(CurrentRow Mod 2, DE('ffffff'),
> > DE('99ccff'))#</cfoutput>">
> >
> > I have been doing this successfully for a while now.
> >
> > Another way of doing it, is set a Counter and then loop. Based on the
> count
> > you can set any color. I have done it with up to 4 colored rows, but 4000
> > colors would be no different (except a very long template).
> >
> > Vance Duke
> > Applications Developer
>
>------------------------------------------------------------------------------
>Archives: http://www.eGroups.com/list/cf-talk
>To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in
>the body.
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.