A self-refreshing Google Calendar iframe

I recently had a client who wanted a shared corporate calendar (displayed on a corporate dashboard site done in Google Sites) to update whenever anyone added something to it.

Unfortunately, there's no way to push data from Google Calendar to external services, so I decided to poke around and find out how other people have resolved this. I learned that apparently most folks are ok with having the calendar refresh with a page refresh. This wouldn't do for my client.

The route I took to solve the problem was to create an Google Gadget iframe wrapper (the bulk of which I took from an existing Google Gadget (written by an Iranian English teacher) and inserted some javascript to make it refresh itself every 120000 milliseconds. This seemed to do the trick. The xml for the Google Gadget iframe wrapper is attached in case it helps anyone else.

To use the attached file as a Google Gadget , you need to save it as an .xml file stored on a publically accessible server somewhere. Then, in Google Sites while editing a page, go to Insert:More gadgets:Insert from URL, then put in the url of the xml page).

Tags: