Solved

cf calendar app formatting question

Posted on 2003-10-21
16
205 Views
Last Modified: 2013-12-24
i'm using a calendar app.  my goal is to assign the calendar dates that have events  a tan table cell bg color.  the rest, just the gray color that you'll see

this is what i need it to look like:

http://redcatweb.org/season/monthly.html

this is what it looks like:

http://www.redcatweb2.org/calendar/newlookmonthly2.cfm?MonthChange=Forward&LastDate=2004/03/21

see how the black dates only show up when there is an event. i understand why this is happening, i just need to know if there is a way around it.

my query:
<CFQUERY datasource="calartscalendar" name="SearchResults">
      Select EventName, EventDescription, Calendar_ID, CalendarDate From calendar Where CalendarDate >= #CreateODBCDate(monthstart)# and CalendarDate <= #CreateODBCDate(monthend)# <cfif #len(eventtype)#>and EventType = '#eventtype#'</cfif>
</CFQUERY>

my output:

<CFLOOP index="ii" from="1" to="#CalDays#">
                          <cfif #ii# gte #offset# and #ii# lte #lastslot# >
                            <cfif day is #datepart("d", now())# and #month(curntdate)# is #month(now())#>
                              <cfset thetdbgcolor="#thetdbgcolornow#">
                              <cfelse>
                              <cfset thetdbgcolor="#thetdbgcolornorm#">
                            </cfif><cfoutput>
                            <td valign=top width="120"  height="#cellheight#" bgcolor="#thetdbgcolor#"></cfoutput> <CFOUTPUT><CFIF day is #datepart("d", now())# and #month(curntdate)# is #month(now())#>
                              <span class="calendarbold">#Day#</span> <CFELSE> <span class="calendarbold"><font color="##FF0000">#Day#</font></span> </CFIF> <BR> </CFOUTPUT> <br>
                                                                                              <CFOUTPUT query="SearchResults">
                                <cfif squaresbg is "lt">
                                  <cfset color=randrange(000000,999999)>
                                  <cfelse>
                                  <CFSET AllowedDigits="abcdef">
                                  <CFSET color="">
                                  <CFLOOP INDEX="Pointer" FROM="1" TO="6">
                                    <CFSET color=color & #mid(AllowedDigits,RandRange(1,6),1)#>
                                  </CFLOOP>
                                </cfif>
                                <CFIF #day# is '#day(calendardate)#'>
                                                <table width="100%" height="100%" cellpadding="0" cellspacing="0"><tr><td bgcolor="f1e39e" valign="top"><span class="calendarbold">#Day#</span></td></tr><tr><td bgcolor="f1e39e" valign="top"><A HREF="showevent.cfm?CalID=#Calendar_ID#">#eventname#</A></td></tr></table><br></CFIF>
                              </CFOUTPUT>
0
Comment
Question by:phillystyle123
  • 8
  • 6
  • 2
16 Comments
 
LVL 11

Expert Comment

by:hart
ID: 9596419
ur display part code is not proper....
check ur view source of html file and ur final out put of cf file.

they won't match

Regards
Hart
0
 
LVL 11

Expert Comment

by:hart
ID: 9596625
i don't know what ogic u r usingbut i think this will work

try this out

now in my below code CURR_DATE is the varibale that as the date...
so for my code to work curr_date should be defined properly...

<CFQUERY datasource="calartscalendar" name="SearchResults">
                Select EventName, EventDescription, Calendar_ID, CalendarDate From calendar Where CalendarDate >= #CreateODBCDate(monthstart)# and CalendarDate <= #CreateODBCDate(monthend)# <cfif #len(eventtype)#>and EventType = '#eventtype#'</cfif>
            </CFQUERY>
            <CFSET Lst_EventName = Replace(ValueList(SearchResults.EventName,'~'),'~~','~ ~','All')>
            <CFSET Lst_EventDescription = Replace(ValueList(SearchResults.EventDescription,'~'),'~~','~ ~','All')>
            <CFSET Lst_Calendar_ID = ValueList(SearchResults.Calendar_ID,'~')>
            <CFSET Lst_CalendarDate = ValueList(SearchResults.CalendarDate,'~')>
            <CFSET Lst_CalendarDay = "">
            <CFLOOP FROM="1" TO="#ListLen(Lst_CalendarDate,'~')#" INDEX="day_index">
                  <CFSET Lst_CalendarDay = ListAppend(Lst_CalendarDay,ListGetAt(Lst_CalendarDate,day_index,'~'),'~')
            </CFLOOP>

<!--- the table part starting just before the april 2004 is displayed --->

<TABLE width="722" border="0" cellspacing="0" cellpadding="0">
                  <TR>
                        <TD align="left" valign="top" width="41">&nbsp;</TD>
                        <TD align="left" valign="top" width="630"><BR>
                        <TABLE width="558" border="0" cellspacing="0" cellpadding="2">
                              <TR>
                                    <TD align="left">
                                    <SPAN class="calendarbold_big"><CFOUTPUT>#DATEFORMAT(CURR_DATE, "mmmm yyyy")#</SPAN></TD>
                                    <TD align="right">
                                    <SPAN class="calendarbold_big"><<  >></SPAN></TD>
                              </TR>
                        </TABLE><BR>
                        <TABLE width="600" border="0" cellspacing="0" cellpadding="4">
                              <TR align="left">
                                    <TD valign="top" width="78" height="">
                                    <SPAN class="calendarbold"><FONT color="#000000">S</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0">
                                    <SPAN class="calendarbold"><FONT color="#000000">M</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0">
                                    <SPAN class="calendarbold"><FONT color="#000000">T</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0">
                                    <SPAN class="calendarbold"><FONT color="#000000">W</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0">
                                    <SPAN class="calendarbold"><FONT color="#000000">T</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0">
                                    <SPAN class="calendarbold"><FONT color="#000000">F</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0">
                                    <SPAN class="calendarbold"><FONT color="#000000">S</SPAN></TD>
                              </TR>
                              <TR bgcolor="#FFFFFF">
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                              </TR>
                              <TR>
                                    <!--- just change curr_date value as per date passed --->
                                    <CFSET I_ROWCNT = 1>
                                    <CFSET I_ROWNO      = 1><!--- WILL HOLD THE N0 0F ROWS DISPLAYED IN CALENDAR. --->                                                            
                                    <CFLOOP FROM="1" TO="#Evaluate(DayOfWeek(CreateDate(Year(Curr_Date), Month(Curr_Date), 1))-1)#" INDEX="i_empty"><!--- put empty spaces till the first day of month comes eg. in case of May..there would be four empty spaces. --->
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                    </CFLOOP>
                                    <CFSET I_ROWCNT = I_EMPTY>
                                    <CFLOOP FROM="1" TO="#DaysInMonth(Curr_Date)#" INDEX="i_day">                                          
                                          <CFIF ListFindNoCase(Lst_CalendarDay,i_day,'~') NEQ 0>
                                                <TD bgcolor="#F1E39E" align="left" valign="top" width="78" height="80"><SPAN class="calendarbold">#i_day#</SPAN><BR>                                          
                                                <SPAN class="frontcopy"><A href="showevent.cfm?CalID=#ListGetAt(Lst_Calendar_ID,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#">#ListGetAt(Lst_EventName,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#</A><BR></TD>      
                                          <CFELSE>                                                
                                                <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold">#i_day#</SPAN><BR></TD>
                                          </CFIF>
                                          <TD align="left" valign="top" width="2" height="80"></TD>                                          
                                          <CFIF I_ROWCNT MOD 13 EQ 0>
                                                </TR>
                                                <TR bgcolor="#FFFFFF">
                                                      <TD align="left" valign="top" colspan="13" height="2"></TD>
                                                </TR>
                                                <TR>
                                                <CFSET I_ROWNO = IncrementValue(I_ROWNO)>
                                          </CFIF>
                                          <CFSET I_ROWCNT = IncrementValue(I_ROWCNT)>
                                    </CFLOOP>
                              </TR>
                              <CFIF I_ROWNO LT 6><!--- hide this row in no. of rows is 6 --->
                                    <TR>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                    </TR>
                              </CFIF>                              
                        </TABLE></TD>
                  </TR>
            </TABLE>
<!--- end of table --->

only thing i haven't incorporated is ><CFIF day is #datepart("d", now())# and #month(curntdate)# is #month(now())#>  is this check kindly incorporate that if the output of my code is proper....

let e know a.s.a.p

Regards
Hart
0
 
LVL 10

Expert Comment

by:Mause
ID: 9596668
Hi  phillystyle123,
Ithink you don't see the date because of this <CFIF>
<CFIF #day# is '#day(calendardate)#'>

I replaced it and I gues this will work for you


<table width="100%" height="100%" cellpadding="0" cellspacing="0">
      <tr>
            <td bgcolor="f1e39e" valign="top">
                  <span class="calendarbold">#Day#</span></td>
            </tr>
      <tr>
            <td bgcolor="f1e39e" valign="top">
                  <CFIF #day# is '#day(calendardate)#'>
                  <A HREF="showevent.cfm?CalID=#Calendar_ID#">#eventname#</A>
                  </CFIF>
            <td>
      </tr>
</table>

Let me know

Mause
0
 
LVL 11

Expert Comment

by:hart
ID: 9596707
but mause
<tr>
         <td bgcolor="f1e39e" valign="top">
              <CFIF #day# is '#day(calendardate)#'>
              <A HREF="showevent.cfm?CalID=#Calendar_ID#">#eventname#</A>
              </CFIF>
         <td>
    </tr>

this he gets from the query output

Regards
Hart
0
 
LVL 10

Expert Comment

by:Mause
ID: 9596754
hhhmmm yes your right it still will not out put the date

then it must be like this:

<table width="100%" height="100%" cellpadding="0" cellspacing="0">
      <tr>
            <td bgcolor="f1e39e" valign="top">
                  <span class="calendarbold">#Day#</span></td>
            </tr>
      <tr>
            <td bgcolor="f1e39e" valign="top">      
            <CFOUTPUT query="SearchResults">
          <cfif squaresbg is "lt">
            <cfset color=randrange(000000,999999)>
          <cfelse>
            <CFSET AllowedDigits="abcdef">
            <CFSET color="">
            <CFLOOP INDEX="Pointer" FROM="1" TO="6">
              <CFSET color=color & #mid(AllowedDigits,RandRange(1,6),1)#>
            </CFLOOP>
          </cfif>
         

                  <CFIF #day# is '#day(calendardate)#'>
                  <A HREF="showevent.cfm?CalID=#Calendar_ID#">#eventname#</A>
                  </CFIF>
          <CFOUTPUT>
            <td>
      </tr>
</table>


Mause
0
 
LVL 11

Accepted Solution

by:
hart earned 250 total points
ID: 9596768
use this is
it is the complete page code that i have tested it and its working fine
i have used harcoded variables to test it u can test it as it is and then uncomment the query part and comment the hardcoded variables

<!DOCTYPE html public "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<TITLE>REDCAT: Monthly Calendar</TITLE>
<META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT TYPE="text/javascript"><!--
function mmLoadMenus() {
  if (window.mm_menu_1008112322_0) return;
            window.mm_menu_1008112322_0 = new Menu("root",250,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008112322_0.addMenuItem("Monthly&nbsp;calendar","location='http://redcatweb.org/season/monthly.html'");
  mm_menu_1008112322_0.addMenuItem("Season&nbsp;overview","location='http://redcatweb.org/season/seasonoverview.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Worldview&nbsp;Series","location='http://redcatweb.org/season/worldviewseries.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Musical&nbsp;Explorations&nbsp;Series","location='http://redcatweb.org/season/musicalexplorations.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Sharon&nbsp;Disney&nbsp;Lund&nbsp;Dance&nbsp;Series","location='http://redcatweb.org/season/lunddance.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Center&nbsp;For&nbsp;New&nbsp;Theater","location='http://redcatweb.org/season/cnt.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Film&nbsp;and&nbsp;Video&nbsp;Series","location='http://redcatweb.org/season/filmvideo.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Community&nbsp;Arts&nbsp;Partnership","location='http://redcatweb.org/season/cap.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;President's&nbsp;Ideas&nbsp;and&nbsp;Dialogues&nbsp;Series","location='http://redcatweb.org/season/presidents.html'");
   mm_menu_1008112322_0.hideOnMouseOut=true;
   mm_menu_1008112322_0.bgColor='#555555';
   mm_menu_1008112322_0.menuBorder=1;
   mm_menu_1008112322_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008112322_0.menuBorderBgColor='#777777';
window.mm_menu_1008114711_0 = new Menu("root",143,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008114711_0.addMenuItem("Gallery&nbsp;at&nbsp;REDCAT","location='http://redcatweb.org/gallery/gallery.html'");
  mm_menu_1008114711_0.addMenuItem("Current&nbsp;exhibition","location='http://redcatweb.org/gallery/current.html'");<!--Craig-->
  mm_menu_1008114711_0.addMenuItem("Exhibition&nbsp;schedule","location='http://redcatweb.org/gallery/exschedule.html'");<!--craig-->
   mm_menu_1008114711_0.hideOnMouseOut=true;
   mm_menu_1008114711_0.bgColor='#555555';
   mm_menu_1008114711_0.menuBorder=1;
   mm_menu_1008114711_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008114711_0.menuBorderBgColor='#777777';
window.mm_menu_1008115821_0 = new Menu("root",158,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008115821_0.addMenuItem("Ticketing information","location='http://redcatweb.org/tickets/tickets.html'");
  mm_menu_1008115821_0.addMenuItem("Times&nbsp;&amp;&nbsp;prices","location='http://redcatweb.org/tickets/timesprices.html'");
    mm_menu_1008115821_0.addMenuItem("Subscribe","location='http://redcatweb.org/tickets/subscribe.html'");
  mm_menu_1008115821_0.addMenuItem("Contact&nbsp;box&nbsp;office","location='http://redcatweb.org/contact.html'");
   mm_menu_1008115821_0.hideOnMouseOut=true;
   mm_menu_1008115821_0.bgColor='#555555';
   mm_menu_1008115821_0.menuBorder=1;
   mm_menu_1008115821_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008115821_0.menuBorderBgColor='#777777';
  window.mm_menu_1008120230_0 = new Menu("root",158,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008120230_0.addMenuItem("Sponsorship","location='http://redcatweb.org/participate/sponsorship.html'");
  mm_menu_1008120230_0.addMenuItem("Support&nbsp;REDCAT","location='http://redcatweb.org/participate/support.html'");
  mm_menu_1008120230_0.addMenuItem("Get&nbsp;involved","location='http://redcatweb.org/participate/getinvolved.html'");
  mm_menu_1008120230_0.addMenuItem("Artist&nbsp;opportunities","location='http://redcatweb.org/participate/artistopportunities.html'");
   mm_menu_1008120230_0.hideOnMouseOut=true;
   mm_menu_1008120230_0.bgColor='#555555';
   mm_menu_1008120230_0.menuBorder=1;
   mm_menu_1008120230_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008120230_0.menuBorderBgColor='#777777';
  window.mm_menu_1008131452_0 = new Menu("root",180,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008131452_0.addMenuItem("Directors'&nbsp;statement","location='http://redcatweb.org/about/directorsstatement.html'");
  mm_menu_1008131452_0.addMenuItem("President's&nbsp;message","location='http://redcatweb.org/about/presidentsmessage.html'");
  mm_menu_1008131452_0.addMenuItem("Acknowledgments","location='http://redcatweb.org/about/acknowledgments.html'");
  mm_menu_1008131452_0.addMenuItem("History","location='http://redcatweb.org/about/history.html'");
  mm_menu_1008131452_0.addMenuItem("Media/Press&nbsp;room","location='http://redcatweb.org/about/mediapressroom.html'");
  mm_menu_1008131452_0.addMenuItem("Team&nbsp;REDCAT","location='http://redcatweb.org/about/team.html'");
    mm_menu_1008131452_0.addMenuItem("Job&nbsp;opportunities","location='  http://calarts.edu/about/employment/nonacademic/index.html'");
  mm_menu_1008131452_0.addMenuItem("Contact&nbsp;REDCAT","location='http://redcatweb.org/contact.html'");
   mm_menu_1008131452_0.addMenuItem("About&nbsp;this&nbsp;site","location='http://redcatweb.org/about/aboutthissite.html'");
   mm_menu_1008131452_0.hideOnMouseOut=true;
   mm_menu_1008131452_0.bgColor='#555555';
   mm_menu_1008131452_0.menuBorder=1;
   mm_menu_1008131452_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008131452_0.menuBorderBgColor='#777777';

  window.mm_menu_1008193622_0 = new Menu("root",124,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008193622_0.addMenuItem("CalArts&nbsp;website","location='http://calarts.edu/'");
  mm_menu_1008193622_0.addMenuItem("Board&nbsp;of&nbsp;Trustees","location='http://calarts.edu/about/trustees.html'");
   mm_menu_1008193622_0.hideOnMouseOut=true;
   mm_menu_1008193622_0.bgColor='#555555';
   mm_menu_1008193622_0.menuBorder=1;
   mm_menu_1008193622_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008193622_0.menuBorderBgColor='#777777';

  window.mm_menu_1013175119_0 = new Menu("root",148,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1013175119_0.addMenuItem("REDCAT&nbsp;tour","location='http://redcatweb.org/visit/tour.html'");
  mm_menu_1013175119_0.addMenuItem("Lounge&nbsp;at&nbsp;REDCAT","location='http://redcatweb.org/visit/lounge.html'");
    mm_menu_1013175119_0.addMenuItem("Merchandise","location='http://redcatweb.org/visit/merchandise.html'");
        mm_menu_1013175119_0.addMenuItem("Publications","location='http://redcatweb.org/visit/publications.html'");
          mm_menu_1013175119_0.addMenuItem("Downtown&nbsp;community","location='http://redcatweb.org/visit/downtowncommunity.html'");
               mm_menu_1013175119_0.addMenuItem("Directions&nbsp;&amp;&nbsp;parking","location='http://redcatweb.org/visit/directionsparking.html'");
   mm_menu_1013175119_0.hideOnMouseOut=true;
   mm_menu_1013175119_0.bgColor='#555555';
   mm_menu_1013175119_0.menuBorder=1;
   mm_menu_1013175119_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1013175119_0.menuBorderBgColor='#777777';

mm_menu_1013175119_0.writeMenus();
} // mmLoadMenus()
<!--
<!--

function newImage(arg) {
      if (document.images) {
            rslt = new Image();
            rslt.src = arg;
            return rslt;
      }
}

function changeImages() {
      if (document.images && (preloadFlag == true)) {
            for (var i=0; i<changeImages.arguments.length; i+=2) {
                  document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
            }
      }
}

var preloadFlag = false;
function preloadImages() {
      if (document.images) {
            about_over = newImage("images/home/about-over.gif");
            doctors_over = newImage("images/home/doctors-over.gif");
            pated_over = newImage("images/home/pated-over.gif");
            appreq_over = newImage("images/home/appreq-over.gif");
            career_over = newImage("images/home/career-over.gif");
            news_over = newImage("images/home/news-over.gif");
            preloadFlag = true;
      }
}

// -->

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

function MM_showMenu(menu, x, y, child, imgname) {
      if (!window.mmWroteMenu) return;
      MM_clearTimeout();
      if (menu) {
            var obj = FIND(imgname) || document.images[imgname] || document.links[imgname] || document.anchors[imgname];
            x = moveXbySlicePos (x, obj);
            y = moveYbySlicePos (y, obj);
      }
      if (document.layers) {
            if (menu) {
                  var l = menu.menuLayer || menu;
                  l.top = l.left = 1;
                  hideActiveMenus();
                  if (this.visibility) l = this;
                  window.ActiveMenu = l;
            } else {
                  var l = child;
            }
            if (!l) return;
            for (var i=0; i<l.layers.length; i++) {                     
                  if (!l.layers[i].isHilite) l.layers[i].visibility = "inherit";
                  if (l.layers[i].document.layers.length > 0) MM_showMenu(null, "relative", "relative", l.layers[i]);
            }
            if (l.parentLayer) {
                  if (x != "relative") l.parentLayer.left = x || window.pageX || 0;
                  if (l.parentLayer.left + l.clip.width > window.innerWidth) l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
                  if (y != "relative") l.parentLayer.top = y || window.pageY || 0;
                  if (l.parentLayer.isContainer) {
                        l.Menu.xOffset = window.pageXOffset;
                        l.Menu.yOffset = window.pageYOffset;
                        l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
                        l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
                        if (l.parentLayer.menuContainerBgColor && l.Menu.menuBgOpaque ) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
                  }
            }
            l.visibility = "inherit";
            if (l.Menu) l.Menu.container.visibility = "inherit";
      } else if (FIND("menuItem0")) {
            var l = menu.menuLayer || menu;      
            hideActiveMenus();
            if (typeof(l) == "string") l = FIND(l);
            window.ActiveMenu = l;
            var s = l.style;
            s.visibility = "inherit";
            if (x != "relative") {
                  s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
                  s.left = s.pixelLeft + 'px';
            }
            if (y != "relative") {
                  s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
                  s.top = s.pixelTop + 'px';
            }
            l.Menu.xOffset = document.body.scrollLeft;
            l.Menu.yOffset = document.body.scrollTop;
      }
      if (menu) window.activeMenus[window.activeMenus.length] = l;
      MM_clearTimeout();
}

function MM_startTimeout() {
      if( window.ActiveMenu ) {
            mmStart = new Date();
            mmDHFlag = true;
            mmHideMenuTimer = setTimeout("mmDoHide()", window.ActiveMenu.Menu.hideTimeout);
      }
}
//-->
</SCRIPT><LINK rel="stylesheet" href="http://calarts.edu/redcat/code/redcat_text2.css" type="text/css">
<SCRIPT language="JavaScript" src="http://calarts.edu/redcat/code/mm_menu.js"></SCRIPT>
</HEAD>
<BODY bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<SCRIPT language="JavaScript1.2">mmLoadMenus();</SCRIPT>
<TABLE bgcolor="#CCCCCC" border="0" cellpadding="0" cellspacing="0" width="748">
      <TR>
            <TD valign="top" align="left" background="http://calarts.edu/images/redcat/mg/mgsecondaryitems_r5_c1.gif">
            <TABLE bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="26">
                  <TR>
                        <TD><IMG name="1" src="http://calarts.edu/images/redcat/mg/mgleftstripe.gif" width="26" height="582" border="0"></TD>
                  </TR>
                  <TR>
                        <TD><IMG name="2" src="http://calarts.edu/images/redcat/mg/mgsecondaryitems_r5_c1.gif" width="26" height="700" border="0"></TD>
                  </TR>
            </TABLE></TD>
            <TD valign="top" align="left">
            <TABLE bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="722">
                  <TR>
                        <TD>
                        <TABLE bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="722">
                              <TR>
                                    <TD><IMG name="3" src="http://calarts.edu/images/redcat/mg/mgsecondaryitems_r1_c2.gif" width="41" height="212" border="0"></TD>
                                    <TD>
                                    <TABLE bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="507">
                                          <TR>
                                                <TD>
                                                <TABLE bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="507" height="60">
                                                      <TR>
                                                            <TD>
                                                            <TABLE width=507 border=0 cellpadding=0 cellspacing=0>
                                                                  <TR>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=47 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=4 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=61 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=7 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=49 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=2 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=42 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=4 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=79 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=52 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=63 height=0></TD>
                                                                        <TD><IMG src="http://calarts.edu/images/redcat/main/spacer.gif" width=97 height=0></TD>
                                                                  </TR>
                                                                  <TR>
                                                                        <TD COLSPAN=12><IMG src="http://calarts.edu/images/redcat/main/menu3_01.gif" width=507 height=19></TD>
                                                                  </TR>
                                                                  <TR>                                                                        <!--red fixed link-->
                                                                        <TD><A href="http://redcatweb.org/contact.html" onMouseOver="MM_swapImage('contact','','http://calarts.edu/images/redcat/main/contact-over.gif',1)" onMouseOut="MM_swapImgRestore()"><IMG src="http://calarts.edu/images/redcat/main/contact.gif" name="contact" width=47 height=15 border="0" id="Image1"></A></TD>
                                                                        <TD COLSPAN=3><A href="http://redcatweb.org/mailinglist.html" onMouseOver="MM_swapImage('mailinglist','','http://calarts.edu/images/redcat/main/mailinglist-over.gif',1)" onMouseOut="MM_swapImgRestore()"><IMG src="http://calarts.edu/images/redcat/main/mailinglist.gif" name="mailinglist" border="0" width=72 height=15></A></TD>
                                                                        <TD><A href="http://redcatweb.org/sitemap.html" onMouseOver="MM_swapImage('sitemap','','http://calarts.edu/images/redcat/main/sitemap-over.gif',1)" onMouseOut="MM_swapImgRestore()"><IMG src="http://calarts.edu/images/redcat/main/sitemap.gif" name="sitemap" border="0" width=49 height=15></A></TD>
                                                                        <TD COLSPAN=3><A href="http://redcatweb.org/search.html" onMouseOver="MM_swapImage('search','','http://calarts.edu/images/redcat/main/search-over.gif',1)" onMouseOut="MM_swapImgRestore()"><IMG src="http://calarts.edu/images/redcat/main/search.gif" name="search" border="0" width=48 height=15></A></TD>
                                                                        <TD COLSPAN=4><IMG src="http://calarts.edu/images/redcat/main/menu3_06.gif" width=291 height=15></TD>
                                                                  </TR>
                                                                  <TR>
                                                                        <TD COLSPAN=12><IMG src="http://calarts.edu/images/redcat/main/menu3_07.gif" width=507 height=5></TD>
                                                                  </TR>
                                                                  <TR>                                                                        <!--main navigation-->
                                                                        <TD COLSPAN=2><A onMouseOver="MM_showMenu(window.mm_menu_1008112322_0,-3,15,null,'season1')" onMouseOut="MM_startTimeout();"><IMG name="season1" src="http://calarts.edu/images/redcat/main/season1.gif" width=51 height=13 border="0"></A></TD>
                                                                        <TD><A onMouseOver="MM_showMenu(window.mm_menu_1008114711_0,0,15,null,'gallery2')" onMouseOut="MM_startTimeout();"><IMG name="gallery2" src="http://calarts.edu/images/redcat/main/gallery2.gif" width=61 height=13 border="0"></A></TD>
                                                                        <TD COLSPAN=3><A onMouseOver="MM_showMenu(window.mm_menu_1008115821_0,2,15,null,'tickets3')" onMouseOut="MM_startTimeout();"><IMG name="tickets3" src="http://calarts.edu/images/redcat/main/tickets3.gif" width=58 height=13 border="0"></A></TD>
                                                                        <TD><A href="" onMouseOver="MM_showMenu(window.mm_menu_1013175119_0,2,15,null,'visit7')" onMouseOut="MM_startTimeout();"><IMG src="http://calarts.edu/images/redcat/main/visit7.gif" name="visit7" width=42 height=13 border="0" id="image1"></A></TD>
                                                                        <TD COLSPAN=2><A onMouseOver="MM_showMenu(window.mm_menu_1008120230_0,2,15,null,'participate4')" onMouseOut="MM_startTimeout();"><IMG name="participate4" src="http://calarts.edu/images/redcat/main/participate4.gif" width=83 height=13 border="0"></A></TD>
                                                                        <TD><A onMouseOver="MM_showMenu(window.mm_menu_1008131452_0,2,15,null,'about5')" onMouseOut="MM_startTimeout();"><IMG name="about5" src="http://calarts.edu/images/redcat/main/about5.gif" width=52 height=13 border="0"></A></TD>
                                                                        <TD><A onMouseOver="MM_showMenu(window.mm_menu_1008193622_0,2,15,null,'calarts6')" onMouseOut="MM_startTimeout();"><IMG name="calarts6" src="http://calarts.edu/images/redcat/main/calarts6.gif" width=63 height=13 border="0"></A></TD>
                                                                        <TD ROWSPAN=2><IMG src="http://calarts.edu/images/redcat/main/menu3_15.gif" width=97 height=20></TD>
                                                                  </TR>
                                                                  <TR>
                                                                        <TD COLSPAN=11><IMG src="http://calarts.edu/images/redcat/main/menu3_16.gif" width=410 height=7></TD>
                                                                  </TR>
                                                            </TABLE></TD>
                                                      </TR>
                                                </TABLE>                                                <!--here--></TD>
                                          </TR>
                                          <TR>
                                                <TD><IMG name="rc" src="http://calarts.edu/images/redcat/mg/mgredcat.gif" width="507" height="152" border="0"></TD>
                                          </TR>
                                    </TABLE></TD>
                                    <TD>
                                    <TABLE bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="174">
                                          <TR>
                                                <TD><A href="http://redcatweb.org/" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('rc','','http://calarts.edu/images/redcat/mg/mgredcat_f2.gif','rcl','','http://calarts.edu/images/redcat/mg/mgredcatleg_f2.gif',1);"><IMG name="7" src="http://calarts.edu/images/redcat/mg/mgredcatlogo.gif" width="174" height="114" border="0"></A></TD>
                                          </TR>
                                          <TR>
                                                <TD><IMG name="rcl" src="http://calarts.edu/images/redcat/mg/mgredcatleg.gif" width="174" height="98" border="0"></TD>
                                          </TR>
                                    </TABLE></TD>
                              </TR>
                        </TABLE></TD>
                  </TR>
            </TABLE><BR>
            <!--- <CFQUERY datasource="calartscalendar" name="SearchResults">
                Select EventName, EventDescription, Calendar_ID, CalendarDate From calendar Where CalendarDate >= #CreateODBCDate(monthstart)# and CalendarDate <= #CreateODBCDate(monthend)# <cfif #len(eventtype)#>and EventType = '#eventtype#'</cfif>
            </CFQUERY>
            <CFSET Lst_EventName = Replace(ValueList(SearchResults.EventName,'~'),'~~','~ ~','All')>
            <CFSET Lst_EventDescription = Replace(ValueList(SearchResults.EventDescription,'~'),'~~','~ ~','All')>
            <CFSET Lst_Calendar_ID = ValueList(SearchResults.Calendar_ID,'~')>
            <CFSET Lst_CalendarDate = ValueList(SearchResults.CalendarDate,'~')> --->
            <CFPARAM NAME="curr_date" DEFAULT="#CreateDate(Year(Now()), Month(Now()), Day(Now()))#">
            <CFSET Lst_EventName = "Event 1~Event 2~ Event 3">
            <CFSET Lst_EventDescription = "Event 1 Desc~Event 2 Desc~Event 3 Desc">            
            <CFSET Lst_Calendar_ID = "1~2~3">
            <CFSET Lst_CalendarDate = "5/10/2003~10/10/2003~25/10/2003">
            <CFSET Lst_CalendarDay = "">
            <CFLOOP FROM="1" TO="#ListLen(Lst_CalendarDate,'~')#" INDEX="day_index">
                  <CFSET Lst_CalendarDay = ListAppend(Lst_CalendarDay,day(dateformat(ListGetAt(Lst_CalendarDate,day_index,'~'),'dd/mm/yyyy')),'~')>
            </CFLOOP>
            
            <TABLE width="722" border="0" cellspacing="0" cellpadding="0">
                  <TR>
                        <TD align="left" valign="top" width="41">&nbsp;</TD>
                        <TD align="left" valign="top" width="630"><BR>
                        <TABLE width="558" border="0" cellspacing="0" cellpadding="2">
                              <TR>
                                    <TD align="left">
                                    <SPAN class="calendarbold_big"><CFOUTPUT>#DATEFORMAT(CURR_DATE, "mmmm yyyy")#</CFOUTPUT></SPAN></TD>
                                    <TD align="right">
                                    <SPAN class="calendarbold_big"><<  >></SPAN></TD>
                              </TR>
                        </TABLE><BR>
                        <TABLE width="600" border="0" cellspacing="0" cellpadding="4">
                              <TR align="left">
                                    <TD valign="top" width="78" height=""><SPAN class="calendarbold"><FONT color="#000000">S</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0"><SPAN class="calendarbold"><FONT color="#000000">M</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0"><SPAN class="calendarbold"><FONT color="#000000">T</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0"><SPAN class="calendarbold"><FONT color="#000000">W</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0"><SPAN class="calendarbold"><FONT color="#000000">T</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0"><SPAN class="calendarbold"><FONT color="#000000">F</SPAN></TD>
                                    <TD valign="top" width="2" height="0"></TD>
                                    <TD valign="top" width="78" height="0"><SPAN class="calendarbold"><FONT color="#000000">S</SPAN></TD>
                              </TR>
                              <TR bgcolor="#FFFFFF">
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                                    <TD align="left" valign="top" width="2" height="2"></TD>
                                    <TD align="left" valign="top" width="78" height="2"></TD>
                              </TR>
                              <TR>
                                    <!--- just change curr_date value as per date passed --->
                                    <CFSET I_ROWCNT = 1>
                                    <CFSET I_ROWNO      = 1><!--- WILL HOLD THE N0 0F ROWS DISPLAYED IN CALENDAR. --->                                                            
                                    <CFLOOP FROM="1" TO="#Evaluate(DayOfWeek(CreateDate(Year(Curr_Date), Month(Curr_Date), 1))-1)#" INDEX="i_empty"><!--- put empty spaces till the first day of month comes eg. in case of May..there would be four empty spaces. --->
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold">&nbsp;</SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80">&nbsp;</TD>
                                    </CFLOOP>
                                    <CFSET I_ROWCNT = I_EMPTY>
                                    <CFOUTPUT>#Lst_CalendarDay#</CFOUTPUT>
                                    <CFLOOP FROM="1" TO="#DaysInMonth(Curr_Date)#" INDEX="i_day">                                                                                                            
                                          <CFIF ListFindNoCase(Lst_CalendarDay,i_day,'~') NEQ 0>
                                                <TD bgcolor="#F1E39E" align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"><CFOUTPUT>#i_day#</CFOUTPUT></SPAN><BR>                                          
                                                <SPAN class="frontcopy"><A href="showevent.cfm?CalID=<CFOUTPUT>#ListGetAt(Lst_Calendar_ID,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#</CFOUTPUT>"><CFOUTPUT>#ListGetAt(Lst_EventName,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#</CFOUTPUT></A><BR></TD>      
                                          <CFELSE>                                                
                                                <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"><CFOUTPUT>#i_day#</CFOUTPUT></SPAN><BR></TD>
                                          </CFIF>
                                          <TD align="left" valign="top" width="2" height="80">&nbsp;</TD>                                          
                                          <CFIF I_ROWCNT MOD 7 EQ 0>
                                                </TR>
                                                <TR bgcolor="#FFFFFF">
                                                      <TD align="left" valign="top" colspan="13" height="2"></TD>
                                                </TR>
                                                <TR>
                                                <CFSET I_ROWNO = IncrementValue(I_ROWNO)>
                                          </CFIF>
                                          <CFSET I_ROWCNT = IncrementValue(I_ROWCNT)>
                                    </CFLOOP>
                              </TR>
                              <CFIF I_ROWNO LT 6><!--- hide this row in no. of rows is 6 --->
                                    <TR>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                          <TD align="left" valign="top" width="2" height="80"></TD>
                                          <TD align="left" valign="top" width="78" height="80"><SPAN class="calendarbold"></SPAN><BR></TD>
                                    </TR>
                              </CFIF>                              
                        </TABLE></TD>
                  </TR>
            </TABLE>
      <CENTER><IMG src="http://calarts.edu/images/redcat/buildings/seasondarkgray.gif" width="640" height="359" alt="" border="0"></CENTER></TD>
      </TR>
</TABLE>
</BODY>
</HTML>

test it as it is first on anew page

regards
Hart
0
 

Author Comment

by:phillystyle123
ID: 9611278
Hi Hart,

WOW! This totally works! I'm getting an error though here's my code (hope i'm commenting and uncommenting the right things) followed by my error:

<CFQUERY datasource="calartscalendar" name="SearchResults">
              Select EventName, EventDescription, Calendar_ID, CalendarDate From calendar Where CalendarDate >= #CreateODBCDate(monthstart)# and CalendarDate <= #CreateODBCDate(monthend)# <cfif #len(eventtype)#>and EventType = '#eventtype#'</cfif>
          </CFQUERY>
          <CFSET Lst_EventName = Replace(ValueList(SearchResults.EventName,'~'),'~~','~ ~','All')>
          <CFSET Lst_EventDescription = Replace(ValueList(SearchResults.EventDescription,'~'),'~~','~ ~','All')>
          <CFSET Lst_Calendar_ID = ValueList(SearchResults.Calendar_ID,'~')>
          <CFSET Lst_CalendarDate = ValueList(SearchResults.CalendarDate,'~')>
          <CFPARAM NAME="curr_date" DEFAULT="#CreateDate(Year(Now()), Month(Now()), Day(Now()))#">
         <!--- <CFSET Lst_EventName = "Event 1~Event 2~ Event 3">
          <CFSET Lst_EventDescription = "Event 1 Desc~Event 2 Desc~Event 3 Desc">          
          <CFSET Lst_Calendar_ID = "1~2~3">
          <CFSET Lst_CalendarDate = "5/10/2003~10/10/2003~25/10/2003">--->
          <CFSET Lst_CalendarDay = "">
          <CFLOOP FROM="1" TO="#ListLen(Lst_CalendarDate,'~')#" INDEX="day_index">
               <CFSET Lst_CalendarDay = ListAppend(Lst_CalendarDay,day(dateformat(ListGetAt(Lst_CalendarDate,day_index,'~'),'dd/mm/yyyy')),'~')>
          </CFLOOP>

error:
An error occurred while evaluating the expression:


#CreateODBCDate(monthstart)#



Error near line 312, column 114.
--------------------------------------------------------------------------------

Error resolving parameter MONTHSTART


ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:

0
 
LVL 11

Expert Comment

by:hart
ID: 9612075
as far as i can understand ur monthstart variable has not got passed or is not defined...

i don't know from where u r passing monthend and monthstart.

i think u should check wether its getting formd or submitted etc..

Regards
Hart
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 11

Expert Comment

by:hart
ID: 9612155
yes u have commented the code correctly :-)
only part that needs to be sure of is this

first time <CFPARAM NAME="curr_date" DEFAULT="#CreateDate(Year(Now()), Month(Now()), Day(Now()))#">

this is fine but when u click on next or prev links then curr_date should be passed accordingly..

hope its clear...


Regards
Hart

0
 

Author Comment

by:phillystyle123
ID: 9613035
Hi Hart - I'm almost there: having a formatting problem:

http://www.redcatweb2.org/calendar/newlookmonthly2changed.cfm

also, here's the code based on your code that i'm using:
<cfquery name="craigcal" datasource="calartscalendar">
SELECT * FROM calendar
</cfquery>

<CFPARAM name="CurntDate" default="#now()#">

<CFIF isdefined("MonthChange")>
                     
                        <CFIF monthchange is 'forward'>
                       
            <CFSET curntdate = createodbcdate(dateadd("m", 1, lastdate))>
      <CFELSE>
            <CFSET curntdate = createodbcdate(dateadd("m", -1, lastdate))>
      </CFIF>
</CFIF>
<CFPARAM name="YearSet" default="#year(CurntDate)#">
<CFPARAM name="MonthSet" default="#month(CurntDate)#">

<!--- Create the date variables to search the Database by. --->
<CFSET monthstart = createdatetime(#yearset#, #monthset#, 1, 0, 0, 0)>
<CFSET monthend = createdatetime(#yearset#, #monthset#, #daysinmonth(monthstart)#, 23, 59, 59)>
                    <CFQUERY datasource="calartscalendar" name="SearchResults">
              Select EventName, EventDescription, Calendar_ID, CalendarDate From calendar Where CalendarDate >= #CreateODBCDate(monthstart)# and CalendarDate <= #CreateODBCDate(monthend)# <cfif #len(eventtype)#>and EventType = '#eventtype#'</cfif>
          </CFQUERY>
          <CFSET Lst_EventName = Replace(ValueList(SearchResults.EventName,'~'),'~~','~ ~','All')>
          <CFSET Lst_EventDescription = Replace(ValueList(SearchResults.EventDescription,'~'),'~~','~ ~','All')>
          <CFSET Lst_Calendar_ID = ValueList(SearchResults.Calendar_ID,'~')>
          <CFSET Lst_CalendarDate = ValueList(SearchResults.CalendarDate,'~')>
          <CFPARAM NAME="curr_date" DEFAULT="#CreateDate(Year(Now()), Month(Now()), Day(Now()))#">
          <!---<CFSET Lst_EventName = "Event 1~Event 2~ Event 3">
          <CFSET Lst_EventDescription = "Event 1 Desc~Event 2 Desc~Event 3 Desc">          
          <CFSET Lst_Calendar_ID = "1~2~3">
          <CFSET Lst_CalendarDate = "5/10/2003~10/10/2003~25/10/2003">--->
          <CFSET Lst_CalendarDay = "">
          <CFLOOP FROM="1" TO="#ListLen(Lst_CalendarDate,'~')#" INDEX="day_index">
               <CFSET Lst_CalendarDay = ListAppend(Lst_CalendarDay,day(dateformat(ListGetAt(Lst_CalendarDate,day_index,'~'),'dd/mm/yyyy')),'~')>
          </CFLOOP>
                    <!--- Code for calculating the days format to display --->
                   
                    <CFSET offset = #dayofweek(monthstart)#>
<CFSET lastslot = #offset# + #daysinmonth(monthstart)#-1>
<CFSET caldays = (#ceiling(lastslot/7)#)*7>
<CFSET day = 1>
<HTML><HEAD><TITLE>REDCAT: Monthly Calendar</TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<SCRIPT type=text/javascript>
<!--
function mmLoadMenus() {
  if (window.mm_menu_1008112322_0) return;
            window.mm_menu_1008112322_0 = new Menu("root",250,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008112322_0.addMenuItem("Monthly&nbsp;calendar","location='http://redcatweb.org/season/monthly.html'");
  mm_menu_1008112322_0.addMenuItem("Season&nbsp;overview","location='http://redcatweb.org/season/seasonoverview.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Worldview&nbsp;Series","location='http://redcatweb.org/season/worldviewseries.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Musical&nbsp;Explorations&nbsp;Series","location='http://redcatweb.org/season/musicalexplorations.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Sharon&nbsp;Disney&nbsp;Lund&nbsp;Dance&nbsp;Series","location='http://redcatweb.org/season/lunddance.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Center&nbsp;For&nbsp;New&nbsp;Theater","location='http://redcatweb.org/season/cnt.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Film&nbsp;and&nbsp;Video&nbsp;Series","location='http://redcatweb.org/season/filmvideo.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Community&nbsp;Arts&nbsp;Partnership","location='http://redcatweb.org/season/cap.html'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;President's&nbsp;Ideas&nbsp;and&nbsp;Dialogues&nbsp;Series","location='http://redcatweb.org/season/presidents.html'");
   mm_menu_1008112322_0.hideOnMouseOut=true;
   mm_menu_1008112322_0.bgColor='#555555';
   mm_menu_1008112322_0.menuBorder=1;
   mm_menu_1008112322_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008112322_0.menuBorderBgColor='#777777';
window.mm_menu_1008114711_0 = new Menu("root",143,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008114711_0.addMenuItem("Gallery&nbsp;at&nbsp;REDCAT","location='http://redcatweb.org/gallery/gallery.html'");
  mm_menu_1008114711_0.addMenuItem("Current&nbsp;exhibition","location='http://redcatweb.org/gallery/current.html'");<!--Craig-->
  mm_menu_1008114711_0.addMenuItem("Exhibition&nbsp;schedule","location='http://redcatweb.org/gallery/exschedule.html'");<!--craig-->
   mm_menu_1008114711_0.hideOnMouseOut=true;
   mm_menu_1008114711_0.bgColor='#555555';
   mm_menu_1008114711_0.menuBorder=1;
   mm_menu_1008114711_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008114711_0.menuBorderBgColor='#777777';
window.mm_menu_1008115821_0 = new Menu("root",158,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008115821_0.addMenuItem("Ticketing information","location='http://redcatweb.org/tickets/tickets.html'");
  mm_menu_1008115821_0.addMenuItem("Times&nbsp;&amp;&nbsp;prices","location='http://redcatweb.org/tickets/timesprices.html'");
    mm_menu_1008115821_0.addMenuItem("Subscribe","location='http://redcatweb.org/tickets/subscribe.html'");
  mm_menu_1008115821_0.addMenuItem("Contact&nbsp;box&nbsp;office","location='http://redcatweb.org/contact.html'");
   mm_menu_1008115821_0.hideOnMouseOut=true;
   mm_menu_1008115821_0.bgColor='#555555';
   mm_menu_1008115821_0.menuBorder=1;
   mm_menu_1008115821_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008115821_0.menuBorderBgColor='#777777';
  window.mm_menu_1008120230_0 = new Menu("root",158,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008120230_0.addMenuItem("Sponsorship","location='http://redcatweb.org/participate/sponsorship.html'");
  mm_menu_1008120230_0.addMenuItem("Support&nbsp;REDCAT","location='http://redcatweb.org/participate/support.html'");
  mm_menu_1008120230_0.addMenuItem("Get&nbsp;involved","location='http://redcatweb.org/participate/getinvolved.html'");
  mm_menu_1008120230_0.addMenuItem("Artist&nbsp;opportunities","location='http://redcatweb.org/participate/artistopportunities.html'");
   mm_menu_1008120230_0.hideOnMouseOut=true;
   mm_menu_1008120230_0.bgColor='#555555';
   mm_menu_1008120230_0.menuBorder=1;
   mm_menu_1008120230_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008120230_0.menuBorderBgColor='#777777';
  window.mm_menu_1008131452_0 = new Menu("root",180,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008131452_0.addMenuItem("Directors'&nbsp;statement","location='http://redcatweb.org/about/directorsstatement.html'");
  mm_menu_1008131452_0.addMenuItem("President's&nbsp;message","location='http://redcatweb.org/about/presidentsmessage.html'");
  mm_menu_1008131452_0.addMenuItem("Acknowledgments","location='http://redcatweb.org/about/acknowledgments.html'");
  mm_menu_1008131452_0.addMenuItem("History","location='http://redcatweb.org/about/history.html'");
  mm_menu_1008131452_0.addMenuItem("Media/Press&nbsp;room","location='http://redcatweb.org/about/mediapressroom.html'");
  mm_menu_1008131452_0.addMenuItem("Team&nbsp;REDCAT","location='http://redcatweb.org/about/team.html'");
    mm_menu_1008131452_0.addMenuItem("Job&nbsp;opportunities","location='  http://calarts.edu/about/employment/nonacademic/index.html'");
  mm_menu_1008131452_0.addMenuItem("Contact&nbsp;REDCAT","location='http://redcatweb.org/contact.html'");
   mm_menu_1008131452_0.addMenuItem("About&nbsp;this&nbsp;site","location='http://redcatweb.org/about/aboutthissite.html'");
   mm_menu_1008131452_0.hideOnMouseOut=true;
   mm_menu_1008131452_0.bgColor='#555555';
   mm_menu_1008131452_0.menuBorder=1;
   mm_menu_1008131452_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008131452_0.menuBorderBgColor='#777777';

  window.mm_menu_1008193622_0 = new Menu("root",124,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1008193622_0.addMenuItem("CalArts&nbsp;website","location='http://calarts.edu/'");
  mm_menu_1008193622_0.addMenuItem("Board&nbsp;of&nbsp;Trustees","location='http://calarts.edu/about/trustees.html'");
   mm_menu_1008193622_0.hideOnMouseOut=true;
   mm_menu_1008193622_0.bgColor='#555555';
   mm_menu_1008193622_0.menuBorder=1;
   mm_menu_1008193622_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1008193622_0.menuBorderBgColor='#777777';

  window.mm_menu_1013175119_0 = new Menu("root",148,16,"Verdana, Arial, Helvetica, sans-serif",10,"#777777","#BF121F","#FFFFFF","#FFFFFF","left","middle",3,0,1000,-5,7,true,false,true,0,true,true);
  mm_menu_1013175119_0.addMenuItem("REDCAT&nbsp;tour","location='http://redcatweb.org/visit/tour.html'");
  mm_menu_1013175119_0.addMenuItem("Lounge&nbsp;at&nbsp;REDCAT","location='http://redcatweb.org/visit/lounge.html'");
    mm_menu_1013175119_0.addMenuItem("Merchandise","location='http://redcatweb.org/visit/merchandise.html'");
        mm_menu_1013175119_0.addMenuItem("Publications","location='http://redcatweb.org/visit/publications.html'");
          mm_menu_1013175119_0.addMenuItem("Downtown&nbsp;community","location='http://redcatweb.org/visit/downtowncommunity.html'");
               mm_menu_1013175119_0.addMenuItem("Directions&nbsp;&amp;&nbsp;parking","location='http://redcatweb.org/visit/directionsparking.html'");
   mm_menu_1013175119_0.hideOnMouseOut=true;
   mm_menu_1013175119_0.bgColor='#555555';
   mm_menu_1013175119_0.menuBorder=1;
   mm_menu_1013175119_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1013175119_0.menuBorderBgColor='#777777';

mm_menu_1013175119_0.writeMenus();
} // mmLoadMenus()
<!--
<!--

function newImage(arg) {
      if (document.images) {
            rslt = new Image();
            rslt.src = arg;
            return rslt;
      }
}

function changeImages() {
      if (document.images && (preloadFlag == true)) {
            for (var i=0; i<changeImages.arguments.length; i+=2) {
                  document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
            }
      }
}

var preloadFlag = false;
function preloadImages() {
      if (document.images) {
            about_over = newImage("images/home/about-over.gif");
            doctors_over = newImage("images/home/doctors-over.gif");
            pated_over = newImage("images/home/pated-over.gif");
            appreq_over = newImage("images/home/appreq-over.gif");
            career_over = newImage("images/home/career-over.gif");
            news_over = newImage("images/home/news-over.gif");
            preloadFlag = true;
      }
}

// -->

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&id.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

function MM_showMenu(menu, x, y, child, imgname) {
      if (!window.mmWroteMenu) return;
      MM_clearTimeout();
      if (menu) {
            var obj = FIND(imgname) || document.images[imgname] || document.links[imgname] || document.anchors[imgname];
            x = moveXbySlicePos (x, obj);
            y = moveYbySlicePos (y, obj);
      }
      if (document.layers) {
            if (menu) {
                  var l = menu.menuLayer || menu;
                  l.top = l.left = 1;
                  hideActiveMenus();
                  if (this.visibility) l = this;
                  window.ActiveMenu = l;
            } else {
                  var l = child;
            }
            if (!l) return;
            for (var i=0; i<l.layers.length; i++) {                     
                  if (!l.layers[i].isHilite) l.layers[i].visibility = "inherit";
                  if (l.layers[i].document.layers.length > 0) MM_showMenu(null, "relative", "relative", l.layers[i]);
            }
            if (l.parentLayer) {
                  if (x != "relative") l.parentLayer.left = x || window.pageX || 0;
                  if (l.parentLayer.left + l.clip.width > window.innerWidth) l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
                  if (y != "relative") l.parentLayer.top = y || window.pageY || 0;
                  if (l.parentLayer.isContainer) {
                        l.Menu.xOffset = window.pageXOffset;
                        l.Menu.yOffset = window.pageYOffset;
                        l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
                        l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
                        if (l.parentLayer.menuContainerBgColor && l.Menu.menuBgOpaque ) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
                  }
            }
            l.visibility = "inherit";
            if (l.Menu) l.Menu.container.visibility = "inherit";
      } else if (FIND("menuItem0")) {
            var l = menu.menuLayer || menu;      
            hideActiveMenus();
            if (typeof(l) == "string") l = FIND(l);
            window.ActiveMenu = l;
            var s = l.style;
            s.visibility = "inherit";
            if (x != "relative") {
                  s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
                  s.left = s.pixelLeft + 'px';
            }
            if (y != "relative") {
                  s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
                  s.top = s.pixelTop + 'px';
            }
            l.Menu.xOffset = document.body.scrollLeft;
            l.Menu.yOffset = document.body.scrollTop;
      }
      if (menu) window.activeMenus[window.activeMenus.length] = l;
      MM_clearTimeout();
}

function MM_startTimeout() {
      if( window.ActiveMenu ) {
            mmStart = new Date();
            mmDHFlag = true;
            mmHideMenuTimer = setTimeout("mmDoHide()", window.ActiveMenu.Menu.hideTimeout);
      }
}
//-->
</SCRIPT>
<LINK href="images/redcat/REDCATMonthlyCalendar_files/redcat_text2.css" type=text/css
rel=stylesheet>
<SCRIPT language=JavaScript
src="images/redcat/REDCATMonthlyCalendar_files/mm_menu.js"></SCRIPT>

<META content="MSHTML 5.50.4611.1300" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
<SCRIPT language=JavaScript1.2>mmLoadMenus();</SCRIPT>

<TABLE cellSpacing=0 cellPadding=0 width=748 bgColor=#cccccc border=0>
  <TBODY>
  <TR>
      <TD vAlign=top align=left
    background="images/redcat/REDCATMonthlyCalendar_files/mgsecondaryitems_r5_c1.gif">
        <TABLE cellSpacing=0 cellPadding=0 width=26 bgColor=#ffffff border=0>
        <TBODY>
        <TR>
              <TD><IMG height=582
            src="images/redcat/REDCATMonthlyCalendar_files/mgleftstripe.gif" width=26
            border=0 name=1></TD>
            </TR>
        <TR>
              <TD><IMG height=700
            src="images/redcat/REDCATMonthlyCalendar_files/mgsecondaryitems_r5_c1.gif"
            width=26 border=0 name=2></TD>
            </TR></TBODY></TABLE></TD>
    <TD vAlign=top align=left>
      <TABLE cellSpacing=0 cellPadding=0 width=722 bgColor=#ffffff border=0>
        <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width=722 bgColor=#ffffff
            border=0>
              <TBODY>
              <TR>
                      <TD><IMG height=212
                  src="images/redcat/REDCATMonthlyCalendar_files/mgsecondaryitems_r1_c2.gif"
                  width=41 border=0 name=3></TD>
                <TD>
                  <TABLE cellSpacing=0 cellPadding=0 width=507 bgColor=#ffffff
                  border=0>
                    <TBODY>
                    <TR>
                      <TD>
                        <TABLE height=60 cellSpacing=0 cellPadding=0 width=507
                        bgColor=#ffffff border=0>
                          <TBODY>
                          <TR>
                            <TD>
                              <TABLE cellSpacing=0 cellPadding=0 width=507
                              border=0>
                                <TBODY>
                                <TR>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=47></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=4></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=61></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=7></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=49></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=2></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=42></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=4></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=79></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=52></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=63></TD>
                                              <TD><IMG height=0
                                src="images/redcat/REDCATMonthlyCalendar_files/spacer.gif"
                                width=97></TD>
                                            </TR>
                                <TR>
                                              <TD colSpan=12><IMG height=19
                                src="images/redcat/REDCATMonthlyCalendar_files/menu3_01.gif"
                                width=507></TD>
                                            </TR>
                                <TR><!--red fixed link-->
                                              <TD><A
                                onmouseover="MM_swapImage('contact','','http://calarts.edu/images/redcat/main/contact-over.gif',1)"
                                onmouseout=MM_swapImgRestore()
                                href="http://redcatweb.org/contact.html"><IMG
                                id=Image1 height=15
                                src="images/redcat/REDCATMonthlyCalendar_files/contact.gif"
                                width=47 border=0 name=contact></A></TD>
                                              <TD colSpan=3><A
                                onmouseover="MM_swapImage('mailinglist','','http://calarts.edu/images/redcat/main/mailinglist-over.gif',1)"
                                onmouseout=MM_swapImgRestore()
                                href="http://redcatweb.org/mailinglist.html"><IMG
                                height=15
                                src="images/redcat/REDCATMonthlyCalendar_files/mailinglist.gif"
                                width=72 border=0 name=mailinglist></A></TD>
                                              <TD><A
                                onmouseover="MM_swapImage('sitemap','','http://calarts.edu/images/redcat/main/sitemap-over.gif',1)"
                                onmouseout=MM_swapImgRestore()
                                href="http://redcatweb.org/sitemap.html"><IMG
                                height=15
                                src="images/redcat/REDCATMonthlyCalendar_files/sitemap.gif"
                                width=49 border=0 name=sitemap></A></TD>
                                              <TD colSpan=3><A
                                onmouseover="MM_swapImage('search','','http://calarts.edu/images/redcat/main/search-over.gif',1)"
                                onmouseout=MM_swapImgRestore()
                                href="http://redcatweb.org/search.html"><IMG
                                height=15
                                src="images/redcat/REDCATMonthlyCalendar_files/search.gif"
                                width=48 border=0 name=search></A></TD>
                                              <TD colSpan=4><IMG height=15
                                src="images/redcat/REDCATMonthlyCalendar_files/menu3_06.gif"
                                width=291></TD>
                                            </TR>
                                <TR>
                                              <TD colSpan=12><IMG height=5
                                src="images/redcat/REDCATMonthlyCalendar_files/menu3_07.gif"
                                width=507></TD>
                                            </TR>
                                <TR><!--main navigation-->
                                              <TD colSpan=2><A
                                onmouseover="MM_showMenu(window.mm_menu_1008112322_0,-3,15,null,'season1')"
                                onmouseout=MM_startTimeout();><IMG height=13
                                src="images/redcat/REDCATMonthlyCalendar_files/season1.gif"
                                width=51 border=0 name=season1></A></TD>
                                              <TD><A
                                onmouseover="MM_showMenu(window.mm_menu_1008114711_0,0,15,null,'gallery2')"
                                onmouseout=MM_startTimeout();><IMG height=13
                                src="images/redcat/REDCATMonthlyCalendar_files/gallery2.gif"
                                width=61 border=0 name=gallery2></A></TD>
                                              <TD colSpan=3><A
                                onmouseover="MM_showMenu(window.mm_menu_1008115821_0,2,15,null,'tickets3')"
                                onmouseout=MM_startTimeout();><IMG height=13
                                src="images/redcat/REDCATMonthlyCalendar_files/tickets3.gif"
                                width=58 border=0 name=tickets3></A></TD>
                                              <TD><A
                                onmouseover="MM_showMenu(window.mm_menu_1013175119_0,2,15,null,'visit7')"
                                onmouseout=MM_startTimeout();
                                href="http://redcatweb.org/season/"><IMG
                                id=image1 height=13
                                src="images/redcat/REDCATMonthlyCalendar_files/visit7.gif"
                                width=42 border=0 name=visit7></A></TD>
                                              <TD colSpan=2><A
                                onmouseover="MM_showMenu(window.mm_menu_1008120230_0,2,15,null,'participate4')"
                                onmouseout=MM_startTimeout();><IMG height=13
                                src="images/redcat/REDCATMonthlyCalendar_files/participate4.gif"
                                width=83 border=0 name=participate4></A></TD>
                                              <TD><A
                                onmouseover="MM_showMenu(window.mm_menu_1008131452_0,2,15,null,'about5')"
                                onmouseout=MM_startTimeout();><IMG height=13
                                src="images/redcat/REDCATMonthlyCalendar_files/about5.gif"
                                width=52 border=0 name=about5></A></TD>
                                              <TD><A
                                onmouseover="MM_showMenu(window.mm_menu_1008193622_0,2,15,null,'calarts6')"
                                onmouseout=MM_startTimeout();><IMG height=13
                                src="images/redcat/REDCATMonthlyCalendar_files/calarts6.gif"
                                width=63 border=0 name=calarts6></A></TD>
                                              <TD rowSpan=2><IMG height=20
                                src="images/redcat/REDCATMonthlyCalendar_files/menu3_15.gif"
                                width=97></TD>
                                            </TR>
                                <TR>
                                              <TD colSpan=11><IMG height=7
                                src="images/redcat/REDCATMonthlyCalendar_files/menu3_16.gif"
                                width=410></TD>
                                            </TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!--here--></TD></TR>
                    <TR>
                              <TD><IMG height=152
                        src="images/redcat/REDCATMonthlyCalendar_files/mgredcat.gif"
                        width=507 border=0 name=rc></TD>
                            </TR></TBODY></TABLE></TD>
                <TD>
                  <TABLE cellSpacing=0 cellPadding=0 width=174 bgColor=#ffffff
                  border=0>
                    <TBODY>
                    <TR>
                              <TD><A
                        onmouseover="MM_swapImage('rc','','http://calarts.edu/images/redcat/mg/mgredcat_f2.gif','rcl','','http://calarts.edu/images/redcat/mg/mgredcatleg_f2.gif',1);"
                        onmouseout=MM_swapImgRestore();
                        href="http://redcatweb.org/"><IMG height=114
                        src="images/redcat/REDCATMonthlyCalendar_files/mgredcatlogo.gif"
                        width=174 border=0 name=7></A></TD>
                            </TR>
                    <TR>
                              <TD><IMG height=98
                        src="images/redcat/REDCATMonthlyCalendar_files/mgredcatleg.gif"
                        width=174 border=0
              name=rcl></TD>
                            </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
      <TABLE cellSpacing=0 cellPadding=0 width=722 border=0>
        <TBODY>
        <TR>
          <TD vAlign=top align=left width=41>&nbsp;</TD>
          <TD vAlign=top align=left width=630><BR>
            <TABLE cellSpacing=0 cellPadding=2 width=558 border=0>
              <TBODY>
              <TR>
                <TD align=left><SPAN class=calendarbold_big><cfoutput>#DateFormat(CurntDate,"MMMM yyyy")#</cfoutput></SPAN></TD>
                <TD align=right><CFOUTPUT>
                            <cfset ldate = "#DateFormat(CurntDate,"yyyy/mm/dd")#">
                            <A href="newlookmonthly2.cfm?MonthChange=Backward&LastDate=#ldate#"><SPAN class=calendarbold_big>&lt;&lt;</SPAN></A>&nbsp;&nbsp;<A href="newlookmonthly2.cfm?MonthChange=Forward&LastDate=#ldate#"><SPAN class=calendarbold_big>&gt;&gt;</span></A></cfoutput></TD></TR></TBODY></TABLE><BR>
                <!--- insert calendar table ---><cfoutput>
                <TABLE width="600" border="0" cellpadding="0" cellspacing="0"></cfoutput>
                  <TR>
                    <TD><table width="600" border="0" cellspacing="0" cellpadding="4">
              <tr align="left">
                <td valign="top" width="78" height=""><span class="calendarbold"><font color="#000000">S</font></span></td>
                <td valign="top" width="2" height="0"></td>
                <td valign="top" width="78" height="0"><span class="calendarbold"><font color="#000000">M</font></span></td>
                <td valign="top" width="2" height="0"></td>
                <td valign="top" width="78" height="0"><span class="calendarbold"><font color="#000000">T</font></span></td>
                <td valign="top" width="2" height="0"></td>
                <td valign="top" width="78" height="0"><span class="calendarbold"><font color="#000000">W</font></span></td>
                <td valign="top" width="2" height="0"></td>
                <td valign="top" width="78" height="0"><span class="calendarbold"><font color="#000000">T</font></span></td>
                <td valign="top" width="2" height="0"></td>
                <td valign="top" width="78" height="0"><span class="calendarbold"><font color="#000000">F</font></span></td>
                <td valign="top" width="2" height="0"></td>
                <td valign="top" width="78" height="0"><span class="calendarbold"><font color="#000000">S</font></span></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td align="left" valign="top" width="78" height="2"></td>
                <td align="left" valign="top" width="2" height="2"></td>
                <td align="left" valign="top" width="78" height="2"></td>
                <td align="left" valign="top" width="2" height="2"></td>
                <td align="left" valign="top" width="78" height="2"></td>
                <td align="left" valign="top" width="2" height="2"></td>
                <td align="left" valign="top" width="78" height="2"></td>
                <td align="left" valign="top" width="2" height="2"></td>
                <td align="left" valign="top" width="78" height="2"></td>
                <td align="left" valign="top" width="2" height="2"></td>
                <td align="left" valign="top" width="78" height="2"></td>
                <td align="left" valign="top" width="2" height="2"></td>
                <td align="left" valign="top" width="78" height="2"></td>
              </tr>
              <tr>
                <!--- just change curr_date value as per date passed --->
                <cfset I_ROWCNT = 1>
                <cfset I_ROWNO     = 1>
                <!--- WILL HOLD THE N0 0F ROWS DISPLAYED IN CALENDAR. --->
                <cfloop from="1" to="#Evaluate(DayOfWeek(CreateDate(Year(Curr_Date), Month(Curr_Date), 1))-1)#" index="i_empty">
                  <!--- put empty spaces till the first day of month comes eg. in case of May..there would be four empty spaces. --->
                  <td align="left" valign="top" width="78" height="80"><span class="calendarbold">&nbsp;</span><br></td>
                  <td align="left" valign="top" width="2" height="80">&nbsp;</td>
                </cfloop>
                <cfset I_ROWCNT = I_EMPTY>
                <cfoutput>#Lst_CalendarDay#</cfoutput>
                <cfloop from="1" to="#DaysInMonth(Curr_Date)#" index="i_day">
                  <cfif ListFindNoCase(Lst_CalendarDay,i_day,'~') NEQ 0>
                    <td bgcolor="#F1E39E" align="left" valign="top" width="78" height="80"><span class="calendarbold"><cfoutput>#i_day#</cfoutput></span><br>
                      <span class="frontcopy"><a href="showevent.cfm?CalID=<CFOUTPUT>#ListGetAt(Lst_Calendar_ID,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#</CFOUTPUT>"><cfoutput>#ListGetAt(Lst_EventName,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#</cfoutput></a><br>
                      </span></td>
                    <cfelse>
                    <td align="left" valign="top" width="78" height="80"><span class="calendarbold"><cfoutput>#i_day#</cfoutput></span><br></td>
                  </cfif>
                  <td align="left" valign="top" width="2" height="80">&nbsp;</td>
                  <cfif I_ROWCNT MOD 7 EQ 0>
                  </cfif>
                </cfloop>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td align="left" valign="top" colspan="13" height="2"></td>
              </tr>
              <tr>
                <cfset I_ROWNO = IncrementValue(I_ROWNO)>
                <cfset I_ROWCNT = IncrementValue(I_ROWCNT)>
              </tr>
              <cfif I_ROWNO LT 6>
                <!--- hide this row in no. of rows is 6 --->
                <tr>
                  <td align="left" valign="top" width="78" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="2" height="80"></td>
                  <td align="left" valign="top" width="78" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="2" height="80"></td>
                  <td align="left" valign="top" width="78" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="2" height="80"></td>
                  <td align="left" valign="top" width="78" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="2" height="80"></td>
                  <td align="left" valign="top" width="78" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="2" height="80"></td>
                  <td align="left" valign="top" width="78" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="2" height="80"></td>
                  <td align="left" valign="top" width="78" height="80"><span class="calendarbold"></span><br></td>
                </tr>
              </cfif>
            </table></TD>
                  </TR>
                </TABLE></TD></TR></TBODY></TABLE>
      <CENTER>
          <IMG height=359 alt=""
      src="images/redcat/REDCATMonthlyCalendar_files/seasondarkgray.gif" width=640
      border=0>
</CENTER></TD></TR></TBODY></TABLE></BODY></HTML>
0
 

Author Comment

by:phillystyle123
ID: 9613046
0
 
LVL 11

Expert Comment

by:hart
ID: 9624978
compare this part in your code with my given code, its different

                  <cfif I_ROWCNT MOD 7 EQ 0><!--- y is this cfif empty, i ahd give some code for that --->
                  </cfif>
                </cfloop>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td align="left" valign="top" colspan="13" height="2"></td>
              </tr>
              <tr>
                <cfset I_ROWNO = IncrementValue(I_ROWNO)>
                <cfset I_ROWCNT = IncrementValue(I_ROWCNT)>

and mine was like this

                                   <CFIF I_ROWCNT MOD 7 EQ 0><!--- see the difference --->
                                        </TR>
                                        <TR bgcolor="#FFFFFF">
                                             <TD align="left" valign="top" colspan="13" height="2"></TD>
                                        </TR>
                                        <TR>
                                        <CFSET I_ROWNO = IncrementValue(I_ROWNO)>
                                   </CFIF>
                                   <CFSET I_ROWCNT = IncrementValue(I_ROWCNT)>
                              </CFLOOP>
                         </TR>
Regards
Hart
0
 

Author Comment

by:phillystyle123
ID: 9629555
Hart -

thank you so much for the help - that totally works!  enjoy the points. one quick related question though - did you see
that i'm getting
"15~16~17~18~30~31~1~1~1~1" in the upper left of the table where the current date is?

this is my code:

<TD align=left><SPAN class=calendarbold_big><cfoutput>#DateFormat(CurntDate,"MMMM yyyy")#</cfoutput></SPAN></TD>

any ideas??  
0
 
LVL 11

Expert Comment

by:hart
ID: 9631475
just remove this code from file <cfoutput>#Lst_CalendarDay#</cfoutput>


its like this
<cfset I_ROWCNT = I_EMPTY>
<cfoutput>#Lst_CalendarDay#</cfoutput>

just remove the cfoutput part then 15~16~17~18~30~31~1~1~1~1 this won't come... :-)


Regards
Hart
0
 

Author Comment

by:phillystyle123
ID: 9632783
thanks again for all the help hart!
0
 

Author Comment

by:phillystyle123
ID: 9654510
hi hart,

i just noticed something major in your code: the dates in the calendar are screwed up.  ie - november starts on the
wrong day, and, although there are 30 days in november - there are 31 using your code - actually, there are 31 in every
month using your code.

can you take a quick look at the code below and tell me if you see anything?????

i started a new question to make it worth your while:

http://experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20783668.html

thanks!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now