Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Another iFrame problem...please dont shoot

    Well okay, I have done quite a bit of searching and have used numerous sets of code (javascript to be more specific) to find a way to automatically resize my iFrames. Now I found a bunch of old threads from back in 2005 but the thing is, their code no longer works for firefox v2 nor the brand new IE. Basically right now I am starting from scratch.

    I have a home page, index.htm. with an iFrame called "iFrame". and I am going to be loading in about 100 different frames (when selected by the flash navigation).

    If I had it my way I would have done this site in coldfusion, but it's my high school's website and they are broke, sooooooo, Any help would be appreciated. I want it to mostly work in Firefox, and If you can help me make it work across all browsers that would be great. Also, I have read a lot of your threads before I registered and am very impressed with the wealth of knowledge you guys have. Thanks.

    -Ali

  • #2
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    bump. Really need some help here guys.

    -Ali
    Distinct media *Coming Soon*

    "We followed white lines to the sunset "

  • #3
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    auto resize iframe

    Here is the javascript to resize an iframe to fit whatever content you link to it.

    <HEAD>
    <script language="JavaScript">
    function resize() {
    var iframe = document.all.stretch;
    iframe.height=document.frames("stretch").document.body.scrollHeight;
    }
    </script>

    </HEAD>


    <BODY>

    <iframe src="default_page_in_iframe_goes_here.htm" name="stretch" scrolling="no" width="100%" frameborder="0" onload="resize()">Your browser does not support inline frames or is currently configured not to display inline frames. </iframe>

    </BODY>

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    @flavorwrench that code will only work in IE and maybe Opera.

    @ali//325i Try the one found here http://www.dynamicdrive.com/dynamici...iframessi2.htm
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #5
    New to the CF scene
    Join Date
    Dec 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks. I appreciate it guys. Got it all working in New IE, New Firefox, have no clue about mac's but then again I don't program for 10% of the computer market lol.

    -Ali
    Distinct media *Coming Soon*

    "We followed white lines to the sunset "


  •  

    Posting Permissions

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