Link to home
Start Free TrialLog in
Avatar of phillystyle123
phillystyle123Flag for United States of America

asked on

cf calendar app suddenly rendering the wrong dates in the wrong places!!!!


i just noticed something major in my 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 my code - actually, there are 31 in every
month using my code.

here's a link to an example:

http://www.redcatweb2.org/calendar/newlookmonthly2changed.cfm?MonthChange=Backward&LastDate=2003/12/30

here's the code in the body of the document: -

<table width="600" border="0" cellspacing="0" cellpadding="4">
              <tr align="left">
                <td valign="top" width="53" height=""><span class="calendarbold"><font color="#000000">S</font></span></td>
                <td valign="top" width="1" height="0"></td>
                <td valign="top" width="53" height="0"><span class="calendarbold"><font color="#000000">M</font></span></td>
                <td valign="top" width="100" height="0"></td>
                <td valign="top" width="68" height="0"><span class="calendarbold"><font color="#000000">T</font></span></td>
                <td valign="top" width="1" height="0"></td>
                <td valign="top" width="55" height="0"><span class="calendarbold"><font color="#000000">W</font></span></td>
                <td valign="top" width="0" height="0"></td>
                <td valign="top" width="53" height="0"><span class="calendarbold"><font color="#000000">T</font></span></td>
                <td valign="top" width="1" height="0"></td>
                <td valign="top" width="53" height="0"><span class="calendarbold"><font color="#000000">F</font></span></td>
                <td valign="top" width="1" height="0"></td>
                <td valign="top" width="57" height="0"><span class="calendarbold"><font color="#000000">S</font></span></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td align="left" valign="top" width="53" height="2"></td>
                <td align="left" valign="top" width="1" height="2"></td>
                <td align="left" valign="top" width="53" height="2"></td>
                <td align="left" valign="top" width="100" height="2"></td>
                <td align="left" valign="top" width="68" height="2"></td>
                <td align="left" valign="top" width="1" height="2"></td>
                <td align="left" valign="top" width="55" height="2"></td>
                <td align="left" valign="top" width="0" height="2"></td>
                <td align="left" valign="top" width="53" height="2"></td>
                <td align="left" valign="top" width="1" height="2"></td>
                <td align="left" valign="top" width="53" height="2"></td>
                <td align="left" valign="top" width="1" height="2"></td>
                <td align="left" valign="top" width="57" 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="53" height="80"><span class="calendarbold">&nbsp;</span><br></td>
                  <td align="left" valign="top" width="1" height="80">&nbsp;</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="100" height="80"><span class="calendarbold"><cfoutput>#i_day#</cfoutput></span><br>
                      <span class="frontcopy">
<cfset myUrl = urlencodedformat(#ListGetAt(Lst_Eventname,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#)>
<cfoutput>
<a href="event.cfm?Eventname=#myUrl#">#ListGetAt(Lst_Eventname,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#</a> </cfoutput></span></td>
                    <cfelse>
                    <td align="left" valign="top" width="68" height="80"><span class="calendarbold"><cfoutput>#i_day#</cfoutput></span><br></td>
                  </cfif>
                  <td align="left" valign="top" width="1" height="80">&nbsp;</td>
                  <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>

              <cfif I_ROWNO LT 6>
                <!--- hide this row in no. of rows is 6 --->
                <tr>
                  <td align="left" valign="top" width="53" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="1" height="80"></td>
                  <td align="left" valign="top" width="53" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="100" height="80"></td>
                  <td align="left" valign="top" width="68" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="1" height="80"></td>
                  <td align="left" valign="top" width="55" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="0" height="80"></td>
                  <td align="left" valign="top" width="53" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="1" height="80"></td>
                  <td align="left" valign="top" width="53" height="80"><span class="calendarbold"></span><br></td>
                  <td align="left" valign="top" width="1" height="80"></td>
                  <td align="left" valign="top" width="57" height="80"><span class="calendarbold"></span><br></td>
                </tr>
              </cfif>
            </table>

another thing i'm trying to do and i'll raise the pts to 300 if anyone can figure it out, is have all the calendar table cells be 80 X 80 - not smtwtfs just the actual dates with no space imbetween cells.


Avatar of hart
hart
Flag of India image

i don't know why u are getting a problem, bcos i only posted my code after testing it now take a look at this whole code, paste it in a new page and try it out check the dates of the month

<!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"><A HREF="try.cfm?Curr_Date=<CFOUTPUT>#DateAdd('m',-1,CURR_DATE)#</CFOUTPUT>"><<</A>  <A HREF="try.cfm?Curr_Date=<CFOUTPUT>#DateAdd('m',1,CURR_DATE)#</CFOUTPUT>">>></A></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>                              
                              <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>

NB: I think the problem with ur code is in >> << part, u must not be passing the curr_date value when ever u click these..

curr_date is important for the code to wok propely., u will never get an error if it is not passed because, i have set a cfparam curr_date as current date.

since october as 31 days it will always show u 31 days if u don't pass the curr_date accordingly..

first u try this and then i will help u with the formating :-)
and don't worry my codes are never faulty ;-)

Regards
Hart
and don't forget to uncomment the query and comment my hardcoded variables like last time..

also
<A HREF="try.cfm?Curr_Date=<CFOUTPUT>#DateAdd('m',-1,CURR_DATE)#</CFOUTPUT>"><<</A>  <A HREF="try.cfm?Curr_Date=<CFOUTPUT>#DateAdd('m',1,CURR_DATE)#</CFOUTPUT>">>></A>

in this line change try.cfm to ur page name and also include the other required variables along with curr_date, once u have tested my code :-)

Regards
Hart
Avatar of phillystyle123

ASKER

ok - it seems like the << >> is def. the prob.  for some reason i changed it from your code. now, i'm getting the
right dates, but the the name of the month at the top is always october (even though the actual cal. dates change)

also, any idea how to format this so, there is no gray space between the "active" dates with the tan backgrounds?  
ideally, i need each date's cell to be 80X80 with no cellpadding,spacing.
good news hart - i figured out the date, eventname thing:

http://redcatweb2.org/calendar/testcaluncomment.cfm?Curr_Date={ts%20'2003-11-29%2000:00:00'}

only thing i need to do with this is what i talked about in my last comment, make the squares 80X80 with no space
whether or not they have eventnames in them.

ya interested, if not, i'll just give you the 200pts and we'll call it a day. if so, i'll up it to 300

;-)
ofcourse i am interested :-)
let me understand what u want, u want the cells to be 80x80

ok i will try and paste the code a.s.a.p...

Regards
Hart


ASKER CERTIFIED SOLUTION
Avatar of hart
hart
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hart- it's been a pleasure - thank you so much!  you just saved me hours upon hours of time. your answer was
perfect!

;-)
u r welcome,
just curious weren't u gonna increase the pts ;-)

its ok if u don't want to, but just wanted know...

Regards
Hart
hi hart - i've got a problem - some of my recurring dates are either showing only a few of many dates or just one
 - my old code displayed all recurring events correctly but for various reasons, i definitely want to use yours.

can you take a quick look at this and let me know if you see what's causing the problem??????

old code (recurring works correctly):

<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())#>
                              #Day# <CFELSE> <span style="#datestylenorm#">#Day# </CFIF> <BR> </CFOUTPUT> <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="javascript:;" onClick="MM_openBrWindow('showevent.cfm?CalID=#Calendar_ID#','calendar','scrollbars=yes,width=410,height=350')">#eventname#</A><br>
                                  <cfelse>
                                </CFIF>
                              </CFOUTPUT> </TD>
                            <CFSET day = #day# + 1>
                            <CFELSE>
                            <cfoutput>
                              <TD width="19" height="#cellheight#">&nbsp; </TD>
                            </cfoutput>
                          </CFIF><CFIF (#ii# mod 7 is 0)>
                        </TR>
                        <TR> </CFIF></CFLOOP>

your code (recurring doesn't work correctly):

<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="80" height="80"><SPAN class="calendarbold">&nbsp;</SPAN><BR></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="80" height="80"><SPAN class="calendarbold"><CFOUTPUT>#i_day#</CFOUTPUT></SPAN><BR>                                  
                                        <SPAN class="frontcopy"><cfset myUrl = urlencodedformat(#ListGetAt(Lst_Eventname,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#)>
<cfoutput>
<a href="event.cfm?Eventname=#myUrl#">#ListGetAt(Lst_Eventname,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#</a> </cfoutput></A><BR></TD>    
                                   <CFELSE>                                        
                                        <TD align="left" valign="top" width="80" height="80"><SPAN class="calendarbold"><CFOUTPUT>#i_day#</CFOUTPUT></SPAN><BR></TD>
                                   </CFIF>                                  
                                   <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>
what do u mean by recurring....

see my code is very simple to understand...
if your query is returning all the events properly and u have used my code correctly
then the events will be shown...

i can't tell wahts wrong like this...
bcos i tested my code here and it was fine...

i can't test wether ur query is returning records properly..
because i don't have the records with me..

hope u understand ...

anywayz paste the whole code and tel me what is coming wrong in my code, show me online if u can

Regards
Hart

hi hart - sorry this has turned into such an involved ?.  perhaps if i wasn't such a jack of all trades/master of none :-)

ok - first off the Eventname is "Peach Blossom Fan."  By recurring I mean a date that happens more than one day in a row.  In the db Peach Blossom Fan goes from 4/9/2004 to 4/24/2004.  However the monthly calendar only displays 4/13/2004 to 4/24/2004

link to page displaying that event:
http://redcatweb2.org/calendar/index.cfm?Curr_Date={ts%20'2004-04-03%2013:34:45'}

another way this is happening:
http://redcatweb2.org/calendar/index.cfm?Curr_Date={ts%20'2003-11-03%2013:34:45'}
you'll see "dumb type (Japan)" on Nov 11.  This actually doesn't occur on this date. In the db it's a recurring Eventname that happens on 11/7/2003 & 11/8/2003.  

here's my complete code:

<!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://www.redcatweb2.org/calendar/index.cfm'");
  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://www.redcatweb2.org/calendar/series.cfm?EventID=3'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Musical&nbsp;Explorations&nbsp;Series","location='http://www.redcatweb2.org/calendar/series.cfm?EventID=2'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Sharon&nbsp;Disney&nbsp;Lund&nbsp;Dance&nbsp;Series","location='http://www.redcatweb2.org/calendar/series.cfm?EventID=6'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Center&nbsp;For&nbsp;New&nbsp;Theater","location='http://www.redcatweb2.org/calendar/series.cfm?EventID=4'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Film&nbsp;and&nbsp;Video&nbsp;Series","location='http://www.redcatweb2.org/calendar/series.cfm?EventID=1'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;Community&nbsp;Arts&nbsp;Partnership","location='http://www.redcatweb2.org/calendar/series.cfm?EventID=5'");
  mm_menu_1008112322_0.addMenuItem("&nbsp;&nbsp;&nbsp;President's&nbsp;Ideas&nbsp;and&nbsp;Dialogues&nbsp;Series","location='http://www.redcatweb2.org/calendar/series.cfm?EventID=7'");
   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>
<SCRIPT language="JavaScript" src="http://calarts.edu/redcat/code/mm_menu.js"></SCRIPT>
<link href="css/testlinks.css" rel="stylesheet" type="text/css">
</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 name="craigcal" datasource="calartscalendar">
SELECT * FROM calendar
</cfquery>

<CFPARAM name="Curr_Date" 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(Curr_Date)#">
<CFPARAM name="MonthSet" default="#month(Curr_Date)#">

<!--- 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>
         
          <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"><A HREF="index.cfm?Curr_Date=<CFOUTPUT>#DateAdd('m',-1,CURR_DATE)#</CFOUTPUT>"><span class="calendarbold_arrows"><font size="6">&#8249;&#8249;</font></span></A>  <A HREF="index.cfm?Curr_Date=<CFOUTPUT>#DateAdd('m',1,CURR_DATE)#</CFOUTPUT>"><span class="calendarbold_arrows"><font size="6">&#8250;&#8250;</font></span></A></SPAN></TD>
                         </TR>
                    </TABLE><BR>
                  <TABLE width="600" border="0" cellspacing="0" cellpadding="6">
              <TR align="left">
                              <TD valign="top" width="80" height=""><SPAN class="calendarbold"><FONT color="#000000">S</SPAN></TD>                              
                              <TD valign="top" width="80" height="0"><SPAN class="calendarbold"><FONT color="#000000">M</SPAN></TD>                              
                              <TD valign="top" width="80" height="0"><SPAN class="calendarbold"><FONT color="#000000">T</SPAN></TD>                              
                              <TD valign="top" width="80" height="0"><SPAN class="calendarbold"><FONT color="#000000">W</SPAN></TD>                              
                              <TD valign="top" width="80" height="0"><SPAN class="calendarbold"><FONT color="#000000">T</SPAN></TD>                              
                              <TD valign="top" width="80" height="0"><SPAN class="calendarbold"><FONT color="#000000">F</SPAN></TD>                              
                              <TD valign="top" width="80" height="0"><SPAN class="calendarbold"><FONT color="#000000">S</SPAN></TD>
                         </TR>
                         <TR bgcolor="#FFFFFF">
                              <TD align="left" valign="top" width="80" height="2"></TD>                              
                              <TD align="left" valign="top" width="80" height="2"></TD>                              
                              <TD align="left" valign="top" width="80" height="2"></TD>                              
                              <TD align="left" valign="top" width="80" height="2"></TD>                              
                              <TD align="left" valign="top" width="80" height="2"></TD>                              
                              <TD align="left" valign="top" width="80" height="2"></TD>                              
                              <TD align="left" valign="top" width="80" 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="80" height="80"><SPAN class="calendarbold">&nbsp;</SPAN><BR></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="80" height="80"><SPAN class="calendarbold"><CFOUTPUT>#i_day#</CFOUTPUT></SPAN><BR>                                  
                                        <SPAN class="frontcopy"><cfset myUrl = urlencodedformat(#ListGetAt(Lst_Eventname,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#)>
<cfoutput>
<a href="event.cfm?Eventname=#myUrl#">#ListGetAt(Lst_Eventname,ListFindNoCase(Lst_CalendarDay,i_day,'~'),'~')#</a> </cfoutput></A><BR></TD>    
                                   <CFELSE>                                        
                                        <TD align="left" valign="top" width="80" height="80"><SPAN class="calendarbold"><CFOUTPUT>#i_day#</CFOUTPUT></SPAN><BR></TD>
                                   </CFIF>                                  
                                   <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="80" height="80"><SPAN class="calendarbold">&nbsp;</SPAN><BR></TD>                                  
                                   <TD align="left" valign="top" width="80" height="80"><SPAN class="calendarbold">&nbsp;</SPAN><BR></TD>                                  
                                   <TD align="left" valign="top" width="80" height="80"><SPAN class="calendarbold">&nbsp;</SPAN><BR></TD>                                  
                                   <TD align="left" valign="top" width="80" height="80"><SPAN class="calendarbold">&nbsp;</SPAN><BR></TD>                                  
                                   <TD align="left" valign="top" width="80" height="80"><SPAN class="calendarbold">&nbsp;</SPAN><BR></TD>                                  
                                   <TD align="left" valign="top" width="80" height="80"><SPAN class="calendarbold">&nbsp;</SPAN><BR></TD>                                  
                                   <TD align="left" valign="top" width="80" height="80"><SPAN class="calendarbold">&nbsp;</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>


i need u to check out two things

after these cfsets and the loop is done [i.e] after
 <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,'~')>
<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>

just output these values on the page...

i.e
<cfoutput>
Event : #Lst_EventDescription#<br>
Cal ID : #Lst_Calendar_ID#<br>
Cal Date : #Lst_CalendarDate#<br><br>
Cal Day : #Lst_CalendarDay#
</cfoutput>


this will let me know wether the lists are forming correctly or not and also wether the dates returned are proper or not..
show this for the dates that are coming wrong.

just paste the output here or show it to me online if u can..

hope its clear..

Regards
Hart

ok -

this is a good month - all one Eventname. looks like the cfoutput below is rendering the correct dates.

see here:

http://redcatweb2.org/calendar/index.cfm?Curr_Date={ts%20'2004-04-04%2010:36:49'}

i used:
<cfoutput>
Event : #Lst_Eventname#<br>
Cal ID : #Lst_Calendar_ID#<br>
Cal Date : #Lst_CalendarDate#<br><br>
Cal Day : #Lst_CalendarDay#
</cfoutput>
got ur problem

replace this loop in your code
          <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>


with

          <CFLOOP FROM="1" TO="#ListLen(Lst_CalendarDate,'~')#" INDEX="day_index">
               <CFSET Lst_CalendarDay = ListAppend(Lst_CalendarDay,day(dateformat(ListGetAt(Lst_CalendarDate,day_index,'~'),'mm/dd/yyyy')),'~')>
          </CFLOOP>

and ur dates will recurr properly..

Regards
Hart

hey u did not say anything about that extra 300 points that u  owe me
remember ???

if u don't want to just say that u can't, i can understand that...
but do say something about it ;-)

Regards
Hart
hi hart - i think we have a 2 part misunderstanding here.

i offered to up the pts on this ? from 200 to 300 if you anyone could help me with part b of my ?: (from ?)

"another thing i'm trying to do and i'll raise the pts to 300 if anyone can figure it out, is have all the calendar table cells be 80 X 80 - not smtwtfs just the actual dates with no space imbetween cells."

i thought i raised the pts from 200 to 300 on this but it looks like i didn't (you only got 200) - so i think i owe you 100 pts not 300? let me know if this makes sense to you? or if i'm sadly mistaken. if i am, i will gladly give you 300 more pts - you've been such a huge help to me!  

i would never try to rip someone off pts. that's certainly not going to get me anywhere in the ee!

craig

anywayz forget it, i just wanted to know....

so did my solution do the trick or not...
it was just the dateformat part that had to be changed for ur dates to work properly

Regards
Hart
hi hart - if it's ok with you, and my explanation makes sense, i'd like to give you the addl 100 pts.  just have to
figure out how to do it.  you helped me out of a real jam with this and i want to show my appreciation.

i've got my daughter this morning  - when she goes down for a nap, i'll try your code.

thanks again,
craig
ur explanation is fair enough...
for awarding points to anyone all u have to do is put an additional post as

points for "hart".
and then award it to the "hart" when he replies on that post, thats how its done in EE.. ;-)

ok have a great parental day.
and try the code whenever u get time ;-)

it should work...

anywayz i will coming online 2mmorow.., its nearly 19:00 out here in India, so shall be leaving now..

Regards
Hart [Harish]
thanks for everything hart - as always, your code works perfectly.  

here's the link to the 100 points page:

https://www.experts-exchange.com/questions/20787382/points-for-hart.html

;-)
craig
thanx :-)

Regards
Hart