you want all days with event 1 say blue, then all days with event 2 green, etc...??? If so, build a structure daColours with keys as the event ids.
daColours[eventid1] daColours[eventid2] daColours[eventid3] Then use something like the below <span style="color:#<cfoutput>#daColours[eventid]#</cfouput>;">Eventid</span> get the idea? HTH D On Mon, 28 Mar 2005 23:08:04 -0500, Les Mizzell <[EMAIL PROTECTED]> wrote: > 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:200370 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

