RSS

LuxCal Forum

The place for questions, suggestions and news about the LuxCal Event Calendar

User:   Password:   Remember Me?   
LuxCal Forum / General / Support / Idea : Dynamic Height whilst using Iframe for upcoming events
Posted:  23 Nov 2011 14:16   Last Edited By: Roel B.
I am using Iframe to display the dynamic content of the upcoming events on our homepage. Since the numer of the events can be 1 or> 7, the height of the iframe box is "always" wrong.

I have solved this by adding this little java code:

<script language="JavaScript">
  <!--
  function calcHeight()
  {
//find the height of the internal page
var the_height=
document.getElementById('resize').contentWindow.
document.body.scrollHeight;

//change the height of the iframe
document.getElementById('resize').height=
the_height;
}
//-->
</script>

and using this iframe string:

<iframe  onLoad="calcHeight();" scrolling="NO"   name="resize" id="resize" allowtransparency="true"  " frameborder="no" src="http://******/luxcal/?hdr=0&cP=5" width="300px"  ></iframe>

You can see the result on : [url=www.jump85.nl]Website Jump85[/url]
Posted:  23 Nov 2011 21:39   Last Edited By: Roel B.
Thanks xam, looks really nice. This is similar to what we do with the  LuxCal mini calendar and very useful.