Joshua
posted this on March 12, 2011 10:24
You can embed your public calendar in an iframe tag if desired. The site will automatically detect that it is inside of a frame and will drop the outer template. Currently the width should be set to 950px - we will adjust things in the future to allow for smaller width.
The height of your iframe is trickier to set - on the list and week views the height of the content will vary. If you want to avoid scrollbars on the side of your iframe we recommend using the following code. This will cause the iframe to auto adjust its height on all modern browsers and show scrollbars for older ones. Replace CALENDAR_URL with your actual Timeshout public site URL.
<script type="text/javascript" charset="utf-8">
var site = 'http://CALENDAR_URL';
function tsResize(e) {
if (e.origin === site) {
document.getElementById("tsframe").style.height = e.data + "px";
}
}
if (window.addEventListener) {
addEventListener("message", tsResize, false);
}else if (window.attachEvent) {
attachEvent("message", tsResize);
}
</script>
<noscript>
<a href="http://CALENDAR_URL">click to view event calendar</a>
</noscript>
<iframe id="tsframe" src="http://CALENDAR_URL" frameBorder="0" scrolling="auto" height="500px" width="950px"/>