Alright, this code is a bit messy but you'll get the idea. Basically, I'm trying to create a template using a mini calendar so that when you move your mouse over a day with an event, it will display the event info of that day below the calendar, then if you move your mouse over another day it will swap the text under the calendar with those days events.
What I have so far is a mini calendar that when you move your mouse over an day, it displays the events for the whole month, instead of the day. I've tried all sorts of different approaches, but obviously it's staring me in the face and I'm just not seeing it.
Here is how the current template looks...
(move the mouse over a day with an event to display the info under the calendar)
http://216.194.96.172/cgi-bin/calendar.pl?template=test.html
here is the code I'm using right now...
==========================
<html>
<head>
<title>Calendar</title>
</head>
<body>
<script>
var linktext=new Array()
linktext[0]=" <% &getEvents( { 'range'=>'month' } ); %> <%FOREACH EVENT%> <%=$DAY->{'datestring'}%> <%= SCHEDULE FIELD(date) %><br> <%= EVENT FIELD(title) %><br><%= EVENT FIELD(description) %><br><%/FOREACH%>"
var ns6=document.getElementById&&!document.all
var ie=document.all
function show_text(thetext, whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML=linktext[thetext]
else if (ns6) document.getElementById(whichdiv).innerHTML=linktext[thetext]
}
function resetit(whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML=' '
else if (ns6) document.getElementById(whichdiv).innerHTML=' '
}
</script>
<center><font face=verdana>
<% &getEvents( { 'range'=>'month' } ); %>
<TABLE BORDER="1">
<TR>
<TH CLASS="thinborder" NOWRAP ALIGN="RIGHT" COLSPAN="7" bgcolor="#C0C0C0">
<%=$MONTH_NAME%> <%=$YEAR%></TH></TR>
<TR>
<%FOREACH GRID COLUMN%>
<% $d=0; %>
<TH CLASS="thinborder" BGCOLOR="<%=$_COLUMN_HEADER_BGCOLOR%>">
<SPAN CLASS="columnheader"><font size="1"><%= $DAY_ABBREVIATIONS->[$COL] %></SPAN></TH>
<%$d++;%>
<%/FOREACH%></TR>
<%FOREACH GRID ROW%>
<TR>
<%FOREACH GRID COLUMN%>
<% $i=0; %>
<a href="<%=$CGI_URL_QUERYSTRING%>selected_datestring=<%=$DAY->{'datestring'}%>&datestring=<%=$DAY->{'datestring'}%>&view=Day" CLASS="griddatetext" >
<TD BGCOLOR="<%IF SELECTED%>#F7F2D7<%ELSE%><%IF EVENTS EXIST%>#CC9999<%/IF%><%/IF%>" CLASS="thinborder" VALIGN=TOP width="24" height="20" <%IF EVENTS EXIST%> onMouseover="show_text(0,'div1')", style.backgroundColor='<%IF SELECTED%>#F7F2D7<%ELSE%><%IF EVENTS EXIST%>#CC9999<%/IF%><%/IF%>', style.fontWeight='normal'" <%/IF%>>
<%IF DISPLAY%>
<font size="1"><SPAN BGCOLOR="<%=$_GRID_DATE_BGCOLOR%>" STYLE="background-color:<%=$_GRID_DATE_BGCOLOR%>"> <NOBR>
<%if($DAY->{'dd'}==1&&$VIEW ne "Month"){%><%=$DAY->{''}%> <%}%><%=$DAY->{'dd'}%></NOBR></SPAN><br>
<%FOREACH EVENT%>
<%$i++;%>
<%IF EVENTS EXIST%>
<font size="1"><span style="background-color: #ffffff"><A CLASS=SELECT HREF="<%=$CGI_URL_QUERYSTRING%>selected_datestring=<%=$DAY->{'datestring'}%>&datestring=<%=$DAY->{'datestring'}%>&view=Day" CLASS="griddatetext"></a><%/FOREACH%>
</span>
<%/IF%>
<%/IF%>
</TD></a>
<%/FOREACH%>
</TR>
<%/FOREACH%>
</TABLE>
<span id="div1">text appears here </span>
</CENTER>
</body>
</html>
===========================
So that's where I stand. Basically, what I've been playing around with is this part:
linktext[0]=" <% &getEvents( { 'range'=>'month' } ); %> <%FOREACH EVENT%> <%=$DAY->{'datestring'}%> <%= SCHEDULE FIELD(date) %><br> <%= EVENT FIELD(title) %><br><%= EVENT FIELD(description) %><br><%/FOREACH%>"
I'm sure it's obvious what I need to do, but my mind is blanking. Any input would be awesome.