Welcome to Geeklog, Anonymous Saturday, November 23 2024 @ 12:04 pm EST

Geeklog Forums

Using a DYNAMIC IFRAME to integrate other scripts into your Geeklog


Status: offline

Nezz

Forum User
Newbie
Registered: 08/08/03
Posts: 5
Well I think I have a workaround for the cross-browser compatibility issues with dynamic IFRAME resizing. You can use this to integrate other scripts into your Geeklog project by copying the code into a Static Page Block.

Just replace the src=URL and the NAME wiith your own data and paste it into the staticpage/php block and it seems to work fine in both IE and Firefox and Opera (newest builds, IE complains a little about this.height but so what...). I have not tested it in other browsers yet but I'm happy with the resutls so far... So if you don't need to support old,old browsers this will make you a happy camper.

Text Formatted Code


<head>
<script language="JavaScript">
 function resize() {
  var iframe = document.all.NAME;
   iframe.height=document.frames("NAME").document.body.scrollHeight;
  }
</script>
</head>
<body onload=resize();>
<iframe src="URL" name="NAME" scrolling="no" width="100%" frameborder="0" onload="this.height=this.contentDocument.height"></iframe>
</body>


 


Hope you enjoy it and constructive criticism is always appreciated.
----------------------------------
Building the better weapon....
----------------------------------

Steve
 Quote

All times are EST. The time is now 12:04 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content