Try this:
<cfset
incFile="/includes/dynamicimages/#Lcase(DayOfWeekAsString(DatePart("d",now()
)))#.cfm">
- j
-----Original Message-----
From: Ian Vaughan [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 11:26 AM
To: CF-Talk
Subject: Dynamic Images Using Coldfusion
Hi
I have the following script that changes an imagemap for each day of the
week, however I would like it to change twice a day once in the morning from
midnight to twelve noon, and from twelve noon to twelve midnight.
How can this be built into the script ? any ideas would be most appreciated,
also is this code the most efficient way to achieve this ?
<cfset mday=DatePart("w","#now()#")>
<cfswitch expression="#mday#">
<cfcase value="1"><cfset
incFile="/includes/dynamicimages/monday.cfm"></cfcase>
<cfcase value="2"><cfset
incFile="/includes/dynamicimages/tuesday.cfm"></cfcase>
<cfcase value="3"><cfset
incFile="/includes/dynamicimages/wednesday.cfm"></cfcase>
<cfcase value="4"><cfset
incFile="/includes/dynamicimages/thursday.cfm"></cfcase>
<cfcase value="5"><cfset
incFile="/includes/dynamicimages/thursday.cfm"></cfcase>
<cfcase value="6"><cfset
incFile="/includes/dynamicimages/saturday.cfm"></cfcase>
<cfcase value="7"><cfset
incFile="/includes/dynamicimages/sunday.cfm"></cfcase>
</cfswitch>
<cfoutput>
<cfinclude template="#incFile#">
</cfoutput>
______________________________________________________________________
Dedicated Windows 2000 Server
PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
Instant Activation � $99/Month � Free Setup
http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists