Results 1 to 4 of 4

Thread: iFrame Help

  1. #1
    Join Date
    Oct 2008
    Location
    London
    Posts
    309
    Tokens
    0

    Default iFrame Help

    Hey does anybody know how to do expandable iFrames, and make iFrames refresh for radio stats?


  2. #2
    Join Date
    Sep 2008
    Posts
    718
    Tokens
    0

    Default

    Quote Originally Posted by Seads View Post
    Hey does anybody know how to do expandable iFrames, and make iFrames refresh for radio stats?
    Code:
    <html>
    <head>
    <script type="text/javascript">
    function resizeIframe(){
      var ifr = document.getElementById("main");
      var ifrBody = ifr.contentWindow.document[getDocBody(ifr.contentWindow)];
      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";
    }
    </script>
    </head>
    <body>
    <iframe id="main" name="main" src="test.htm" style="width:100%;height:200px;" frameborder="0" onload="resizeIframe();"></iframe>
    </body>
    </html>
    There's the expandable iFrame script, and I actually am looking for something like the second thing you said.
    +.net - omg it's coming o_o

  3. #3
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    Just use a meta refresh?

    Code:
    <meta http-equiv="refresh" content="seconds;url=url-of-this-page" />


  4. #4
    Join Date
    Oct 2008
    Location
    London
    Posts
    309
    Tokens
    0

    Default

    Thanks +rep


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •