Push google cal, changes to display.

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I have a display with two google calendar iFrames on it and it works fine. Problem is it does not refresh or show changes unless we refresh the display.  So i put in some script too refresh the iframe every 5 min and it seems to work fine, but not the best way to do it.  Is there another way to retain the standard calendar look put get them to refresh of get the changes pushed. Maybe a widget with a refresh time option?  Just looking for ideas.
Photo of Neil Ecker

Neil Ecker

  • 172 Points 100 badge 2x thumb

Posted 3 years ago

  • 1
Photo of Alex Kolenoff

Alex Kolenoff

  • 3,506 Points 3k badge 2x thumb
Neil, I take it you don't want to use the Calendar widget, is that correct?  

Is there any way you could refactor things on your end so you could create a web page showing the calendar the way you want, and then use the Web Page widget which has a refresh option?
Photo of Neil Ecker

Neil Ecker

  • 172 Points 100 badge 2x thumb
Not that I don't want to use the widget. I'm showing to calendars with multiple users per calendar. In googles standard format, and being able to adjust colors. To the best of my knowledge no. If the widgets support multi users or standard formats?
Photo of Alex Kolenoff

Alex Kolenoff

  • 3,506 Points 3k badge 2x thumb
Hi Neil, when you say multiple users per calendar, do you mean a group calendar?  I don't think it matters how many users there are in order to use the Google Calendar widget, if I understand you correctly.

How are you refreshing the calendar currently, via a tag in the HTML in Rise Editor that refreshes the entire presentation or just the Placeholder/calendar itself?
Photo of Neil Ecker

Neil Ecker

  • 172 Points 100 badge 2x thumb
Sorry for the long delay it as been nuts.  I got the following code working and actually running two different calendars on one presentation with rotating images in one corner. Works great.  It only refreshes the frame for the calendar and you are able to set the refresh time according to your update needs
Of course the google cal need to be public or show free/busy (at the least). I used the tool for sharing that google has in the cal section to select a bunch of shared cals  and colors etc.

<script>
function refresh() {
var iframe = document.getElementById('cal');
iframe.src = iframe.src;
}
setInterval(refresh, 180000);
</script>
<iframe id="cal" src="https://calendar.google.com/ca...................../>

Photo of Ashleigh

Ashleigh

  • 3,740 Points 3k badge 2x thumb
Thanks for sharing Neil!
Are you also aware of the 'agenda' view Google offers? Pretty cool: https://community.risevision.com/rise_vision_inc/topics/how-to-display-group-calendars
Glad you got your refresh sorted out.