Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2006
    Location
    Sunderland
    Posts
    5,027
    Tokens
    1,306

    Latest Awards:

    Default Expandable iFrame

    Anyone got a code for an expandable iframe?

    Will +rep :]

    Moved by opensourcehost (Forum Moderator) from Web Designing: Please post in the correct forum next time, thanks .
    Last edited by Mr.OSH; 18-05-2007 at 07:39 PM.


  2. #2
    Join Date
    Sep 2006
    Location
    Doncaster, UK
    Posts
    4,081
    Tokens
    0

    Latest Awards:

    Default

    Code:
    <script type="text/javascript">
                //<![CDATA[
                window.onload = function() {
                    var f = document.getElementById("mainframe");
                    function resize() {
                        var h = "";
                        var w = "";
                        if (f.contentDocument) {
                            h = f.contentDocument.documentElement.offsetHeight + 20 + "px";
                            // can't find anything for Opera and Firefox that works for the width. OffetWidth doesn't work right either.(f.contentDocument.documentElement,"").getPropertyValue("width");
                        } else if (f.contentWindow) {
                            h = f.contentWindow.document.body.scrollHeight + 5 + "px";
                        } else {
                            return;
                        }
                        f.setAttribute("height",h);
                        f.parentNode.setAttribute("height",h);
                    }
                    if (window.addEventListener) {
                        f.onload = resize;
                    } else if (f.attachEvent) {
                        f.attachEvent("onload", resize);
                    } else {
                        return;
                    }
                    resize();
                }
                //]]>
                        </script>
    			  <iframe name="middle" id="mainframe" src="home.php" width="495PX" frameborder="0" allowtransparency="yes" scrolling="no"></iframe>
    Quote Originally Posted by Nain View Post
    i voted 'Not Sure' as im, not sure!

  3. #3
    Join Date
    Feb 2006
    Location
    Sunderland
    Posts
    5,027
    Tokens
    1,306

    Latest Awards:

    Default

    Cheers, Adam.


Posting Permissions

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