iFrame resizer

adrianbj
2010-03-15
2013-05-28
  • adrianbj

    adrianbj - 2010-03-15

    Hey Matthias,

    I just discovered that the iframe resizer javacsript that you show on http://www.refbase.net/index.php/Integrating_refbase_into_your_web_site is not working in IE8 - check out the link to your example page. However, I found that the following does work:

    function resizeIframe(frameName){
      var ifr = document.getElementById(frameName);
      var ifrBody = ifr.contentWindow.document;
      ifr.style.height=ifrBody.scrollHeight+"px";
    }

    function getDocBody(win){
      if (!win) win=window;
      if (win.document.compatMode && win.document.compatMode != 'BackCompat') { //standards compliant mode
        return "documentElement";
      }
      return "body";
    }

    Cheers,
    Adrian

     
  • Matthias Steffens

    I just discovered that the iframe resizer javacsript  is not working in IE8

    Thanks Adrian! I'll update the docs & examples.

    Best, Matthias

     
  • heem

    heem - 2010-06-23

    I have found that by removing the <div> style lines from the original script it works as it should, even in IE 8.

    For some reason it doesn't work for me even with the new script suggestion by Adrian if the <div> tags are in place.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks