If you look at the calendar I'm using at Gavit Sports:
[dead link removed]
You will see that I've added drop down selection to go to other calendars on the site.
If this is what you are looking for you need to add:
code:
<!-- Select Calendar Navigation Script -->
<script language="JavaScript" type="text/javascript">
<!--
function menu_goto( menuform )
{
selected_item = menuform.newurl.selectedIndex;
choice = menuform.newurl.options[ selected_item ].value;
newurl = "http://www.gavitsports.org/cgi-bin/calendar.pl?calendar=" + menuform.newurl.options[ selected_item ].value;
if (choice.length != 0)
{
location.href = newurl;
}
}
//-->
</script>
<!-- End Calendar Navigation Script -->
into the head section of your template. Then add something like this:
code:
<!-- added calendar navigation -->
<TABLE BORDER="0" CLASS="thinborder" WIDTH="100" BGCOLOR="<%=$COMMAND_BGCOLOR%>">
<tr>
<td BGCOLOR="<%=$_COMMAND_OPTION_BGCOLOR%>" align="center" valign="middle">Select Calendar</td>
</tr>
<tr>
<td BGCOLOR="<%=$_COMMAND_OPTION_BGCOLOR%>">
<form name="menu_form" id="menu_form" action="post">
<select size="1" class="style" name="newurl" onchange="menu_goto(this.form)">
<option selected value="">--- Boys ---</option>
<option value="baseball">Baseball</option>
<option value="bbb">Basketball</option>
<option value="xcountry">Cross Country</option>
<option value="football">Football</option>
<option value="golf">Golf</option>
<option value="bsoc">Soccer</option>
<option value="btennis">Tennis</option>
<option value="btrack">Track</option>
<option value="wrestling">Wrestling</option>
</select>
</form>
</td>
</tr>
<tr>
<td BGCOLOR="<%=$_COMMAND_OPTION_BGCOLOR%>">
<form name="menu_form" id="menu_form" action="post">
<select size="1" class="style" name="newurl" onchange="menu_goto(this.form)">
<option selected value="">--- Girls ---</option>
<option value="gbb">Basketball</option>
<option value="xcountry">Cross Country</option>
<option value="gsoc">Soccer</option>
<option value="softball">Softball</option>
<option value="swim">Swimming</option>
<option value="gtennis">Tennis</option>
<option value="gtrack">Track</option>
<option value="vb">Volleyball</option>
</select>
</form>
</td>
</TABLE>
<BR>
<!-- end added calendar navigation -->
just before the line:
code:
<!-- COMMAND/VIEW OPTIONS -->
If you want the drop down box in the same place I put mine.
This method does not check to see if a user has permission to view a calendar. If you log-in and change calendars with the drop down selection you could end up changing things in the wrong calendar.
There may be other drawbacks, but it seems to work fine for me.
BTW, the above example adds two drop down boxes. If you only need one delete the second form.
------------------
Dale Ray
[This message has been edited by eladyar (edited March 27, 2003).]
[This message has been edited by eladyar (edited August 20, 2004).]