I'm trying to embed a calendar and am having issues. I want to use it
as a small panel for events using the Agenda view and then i have an
onclick() link to view calendar that should expand the iframe to fill
the screen and change the src to change the calendar mode to Month. It
changes to Month view and expands fine, but it ignores parameters like
showTabs=no and showCalendars=no, basically giving the default view,
and then when i click again to go back to the Agenda side pane it
shrinks back to the panel size but stays on the default calendar view.
I've tried adding a refresh call on the src update, but that doesn't
help, and when I refresh the page it doesnt help either. I have to
close the window and reload in a new tab to get the Agenda view back.

<script type="text/javascript">
mode = 0;
function changeCal()
{
    if(mode == 0)
    {
        mode = 1;
        var f = document.getElementById('cal');
        f.src = "http://www.google.com/calendar/embed?
showTitle=0&amp;showTabs=0&amp;showCalendars=0&amp;height=720&amp;wkst=1&amp;bgcolor=
%23FFFFFF&amp;src=gs28nldpc3bklcv2l12ou65g0s
%40group.calendar.google.com&amp;color=%232952A3&amp;ctz=America
%2FNew_York";
        f.width = "720";
        f.contentWindow.location.reload('true');
    }
    else
    {
        mode = 0;
        var f = document.getElementById('cal');
        f.src = "http://www.google.com/calendar/embed?
showTitle=0&amp;showTabs=0&amp;showCalendars=0&amp;mode=AGENDA&amp;height=600&amp;wkst=1&amp;bgcolor=
%23FFFFFF&amp;src=gs28nldpc3bklcv2l12ou65g0s
%40group.calendar.google.com&amp;color=%232952A3&amp;ctz=America
%2FNew_York";
        f.width = "560";
        f.contentWindow.location.reload('true');
    }
}
</script>

<a onclick = "changeCal()">View Calendar</a>
</p>
<iframe id = "cal" src = "http://www.google.com/calendar/embed?
showTitle=0&amp;showTabs=0&amp;showCalendars=0&amp;mode=AGENDA&amp;height=410&amp;wkst=1&amp;bgcolor=
%23FFFFFF&amp;src=gs28nldpc3bklcv2l12ou65g0s
%40group.calendar.google.com&amp;color=%232952A3&amp;ctz=America
%2FNew_York" style=" border-width:0 " width="560" height="410"
frameborder="0" scrolling="no">
</iframe>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Calendar Data API" group.
To post to this group, send email to 
[email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to