My source follows. To use, you can paste all of this into a single Text/Html module or do as I did and put the iFrame part of it in one Text/Html module and the check boxes and script source into a separate Text/Html module that can be located elsewhere. To use with your own calendars you must first make sure that all of the calendars you wish to use have been shared to the public. Then you will want to customize the UI to fit your needs and list the calendars that interest you. You'll then need to modify the array in the javascript. The first element of the array lists the name of the checkbox that's associated with a calendar. The second element lists the identifier for the calendar. To get the identifier, you will need to go to Google Calendars and go to the settings for each calendar. In the "Calendar Address" section, click on the "HTML" icon. A little window appears. Copy the text in the Url between "src=" and ".calendar.google.com".
If you're not using checkboxes for your UI, then you'll need to customize the script a little. I'd love to see other UIs that people come up with for this, so if you implement something different please post a link.
Good luck and have fun!
Ian
<html>
<body>
<table>
<tr>
<td>
<iframe name="calendarFrame"
src=""
style=" border-width:0 "
width="640"
frameborder="0"
height="650"></iframe>
</td>
<td>
<u>Councils & Districts</u><br>
<input id="chkMTCBSA" type="checkbox" onclick="ChangeCalendar();" checked/>Middle TN Council<br>
<input id="chkERDistrict" type="checkbox" onclick="ChangeCalendar();" checked/>Elk River District<br>
<br>
<u>Tullahoma, TN Units</u><br>
<input id="chkTroop158" type="checkbox" onclick="ChangeCalendar();" checked/>Troop 158<br>
<input id="chkPack142" type="checkbox" onclick="ChangeCalendar();"/>Pack 142<br>
<input id="chkPack142Den1" type="checkbox" onclick="ChangeCalendar();"/>Pack 142 - Den #1<br>
<input id="chkPack142Den2" type="checkbox" onclick="ChangeCalendar();"/>Pack 142 - Den #2<br>
<input id="chkPack142Den3" type="checkbox" onclick="ChangeCalendar();"/>Pack 142 - Den #3<br>
<input id="chkPack142Den4" type="checkbox" onclick="ChangeCalendar();"/>Pack 142 - Den #4<br>
<input id="chkPack142Den5" type="checkbox" onclick="ChangeCalendar();"/>Pack 142 - Den #5<br>
<input id="chkPack142Den6" type="checkbox" onclick="ChangeCalendar();"/>Pack 142 - Den #6<br>
<input id="chkPack142Den7" type="checkbox" onclick="ChangeCalendar();"/>Pack 142 - Den #7<br>
<input id="chkPack142Den8" type="checkbox" onclick="ChangeCalendar();"/>Pack 142 - Den #8<br>
<input id="chkPack142Den9" type="checkbox" onclick="ChangeCalendar();"/>Pack 142 - Den #9<br>
<br>
<u>Miscellaneous</u><br>
<input id="chkUSHolidays" type="checkbox" onclick="ChangeCalendar();" checked/>U.S. Holidays<br>
<input id="chkTullahomaSchools" type="checkbox" onclick="ChangeCalendar();" checked/>Tullahoma City Schools<br>
<input id="chkSolarLunar" type="checkbox" onclick="ChangeCalendar();"/>Solar-Lunar<br>
</td>
</tr>
</table>
</body>
</html>
<script language="javascript">
var calendar = new Array(
["chkMTCBSA", "kq4jhef3pd4hf5ke2p9pugoji0%40group"],
["chkTroop158", "q05gp43g2hfc91slenm01kpp70%40group"],
["chkERDistrict", "713gcl3rrf2u1vehl2lbchbq40%40group"],
["chkPack142", "d58p08oovnrua5h2l1u6v3f7io%40group"],
["chkPack142Den1", "blqrbc9rj1l7jtdk02tbos15pc%40group"],
["chkPack142Den2", "8ugq08k7v9q7mc0mo9iiuhtmcs%40group"],
["chkPack142Den3", "0orqfco49kmplu0ks7p0b4k2r8%40group"],
["chkPack142Den4", "8plrih51nogl6i2habbfd3ktvs%40group"],
["chkPack142Den5", "qkoi0oiseftbanlr5ktagp53c4%40group"],
["chkPack142Den6", "te2mphpdfecgogq140cmvn4pu0%40group"],
["chkPack142Den7", "ar0c63gk6i82uf1c59kvunveo0%40group"],
["chkPack142Den8", "n3lcshn3jek3gkssmhns1ocqes%40group"],
["chkPack142Den9", "hu7tqi4u4okcivr9djmltf5rh8%40group"],
["chkUSHolidays", "usa__en%40holiday"],
["chkTullahomaSchools", "uomsgtpmbrdi8cq5fh50n2gmg8%40group"],
["chkSolarLunar", "jvrgcrf0tsjj1bvpucarbal8n8cgr8ic%40import"]
)
function ChangeCalendar() {
// Build querystring.
var qstring = "";
var ndx = 0;
for( ndx = 0; ndx <= calendar.length - 1; ndx++ ) {
if( document.getElementById( calendar[ndx][0] ).checked && calendar[ndx][1] != "" )
qstring += '&src=' + calendar[ndx][1] + '.calendar.google.com';
}
if( qstring == "" ) {
|