"OK, so where do you reset/advance the counter to get it to switch the
CSS when the date changes?"
Ah come on, I left that for you to do ;O)
---------------
<div class="#myCSS#"> - Lots of stuff here - </div>
<cfset counter = counter + 1>
---------------
You may need to reset the counter inside the grouping cfoutput.
Ade
-----Original Message-----
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: 29 March 2005 05:08
To: CF-Talk
Subject: Re: Alternating Row Colour - Sorta
RE: http://www.stpaulscolumbia.com/calendar_test.cfm
Still not working - but - I don't see anything in the below that
advances the counter anywhere ... the counter is *always* = 1 in the
code below.
OK, so where do you reset/advance the counter to get it to switch the
CSS when the date changes?
> What about this:
>
> <cfquery name="calendar">
> SELECT
> id, event_date, month(event_date) as theMONTH, event_name, event_pic
> FROM stpaul_events
> WHERE month(event_date) >= #month(now())#
> and month(event_date) < #threemonths#
> ORDER BY event_date ASC
> </cfquery>
>
> <cfset counter = 1>
>
> <cfoutput query="calendar" group="theMONTH">
>
> <h4>#LSDateFormat(calendar.event_date,'MMMM - YYYY')#</h4>
>
> <div id="eventBODY">
>
> <cfoutput>
>
> <cfif
> counter NEQ 1 AND
> Day(calendar["event_date"][counter]) NEQ
> Day(calendar["event_date"][counter - 1])
> >
> <cfset myCSS = "eventWHITE">
> <cfelse>
> <cfset myCSS = "eventYELLOW">
> </cfif>
>
> <div class="#myCSS#"> - Lots of stuff here - </div>
>
> <cfset counter = 1>
>
> </cfoutput>
>
> </div>
>
> </cfoutput>
>
> -----Original Message-----
> From: Les Mizzell [mailto:[EMAIL PROTECTED]
> Sent: 29 March 2005 00:57
> To: CF-Talk
> Subject: Re: Alternating Row Colour - Sorta
>
>
> Here's the whole code block for reference. It displays three months of
> events at a time:
>
> QUERY:
>
> <cfquery name="calendar">
> SELECT
> id, event_date, month(event_date) as theMONTH, event_name, event_pic
> FROM stpaul_events
> WHERE month(event_date) >= #month(now())#
> and month(event_date) < #threemonths#
> ORDER BY event_date ASC
> </cfquery>
>
> OUTPUT BLOCK
>
> <cfoutput query="calendar" group="theMONTH">
> <h4>#LSDateFormat(calendar.event_date,'MMMM - YYYY')#</h4>
>
> <div id="eventBODY">
> <cfoutput>
>
> <cfif CurrentRow NEQ 1 AND Day(calendar["event_date"][CurrentRow])
> NEQ Day(calendar["event_date"][CurrentRow - 1])>
> <cfset myCSS = "eventWHITE">
> <cfelse>
> <cfset myCSS = "eventYELLOW">
> </cfif>
>
> <div class="#myCSS#"> - Lots of stuff here - </div>
> </cfoutput>
>
> --
> -----------
> Les Mizzell
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.8.4 - Release Date: 27/03/2005
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200380
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54