Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

8043 Posts in 1856 Topics- by 2099 Members - Latest Member: roi
Calendar Script CommunityCustomizationCustomizing CalendarScript (Moderators: scott, DanO, Marty)easily switch to a different calendar?
Pages: [1]   Go Down
Print
Author Topic: easily switch to a different calendar?  (Read 330 times)
0 Members and 1 Guest are viewing this topic.
karen
New Member
*

Karma: 0
Offline Offline

Posts: 0


« on: March 27, 2003, 12:14:00 PM »

I'm just starting to play with Calendar Script...so I've recently installed it as default and am working through customizing it for my needs.  And I've got a question.

I know that you can specify a different calendar via URL.  But I'm wondering if I could set it up such that:

If I'm looking at one calendar, there is a spot that lists the other calendars available and I can easily select to switch to a different calendar.

Is this an option?  Or is there a way to set this up?  Perhaps it can be a more general question about adding more surrounding navigation to the calendar page (such as some standard web page look and feel from the rest of my site)...is this included in modifying the template?

Thanks for any help!

      Karen

Logged
tw1000
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #1 on: March 27, 2003, 04:48:00 PM »

Hi, try http://www.much2.com/   Dan O. maintains this site and is full of information.
http://www.calendarscript.com/support/forum/Forum5/HTML/000135.html

This link will help you create a pull-down box

------------------

Logged
eladyar
New Member
*

Karma: 0
Offline Offline

Posts: 0


WWW
« Reply #2 on: March 27, 2003, 07:51:00 PM »

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).]

Logged

Pages: [1]   Go Up
Print
Jump to: