Results 1 to 3 of 3

Hybrid View

  1. #1

    * Iframe problem in safari

    Hello all,

    I am having a very annoying problem, I have added an Iframe in my webpages:
    <iframe width="98%" id="the_iframe"
    onLoad="calcHeight();"
    src="https://www.mysitename.com/support/index_login.php"
    scrolling="NO"
    frameborder="0"
    height="1">
    </iframe>

    the great thing with this code is that when my Iframe height changes,my webpage layout streches as well, this is great in Opeara/firefox/IE but does not work at all in Safari,any idea why and how to change/reverse this problem please?


    Many Thanks,


    BamBam

  2. #2
    You're going to need to post the code of your calcHeight() method in order for anyone to help you.

  3. #3
    Hi Random,

    you are right, I forgot this code :-)
    <script language="JavaScript">
    <!--
    function calcHeight()
    {
    //find the height of the internal page
    var the_height=
    document.getElementById('the_iframe').contentWindow.
    document.body.scrollHeight;

    //change the height of the iframe
    document.getElementById('the_iframe').height=
    the_height;
    }
    //-->
    </script>


    thanks!

Similar Threads

  1. Javascript iframe problem
    By BurakUeda in forum Programming Discussion
    Replies: 1
    Last Post: 10-15-2007, 05:32 AM
  2. iframe injection problem and rkhunter warnings
    By xserverx in forum Hosting Security and Technology
    Replies: 5
    Last Post: 08-27-2007, 05:20 PM
  3. severe <iframe> injection problem please help
    By jxnms in forum Hosting Security and Technology
    Replies: 12
    Last Post: 12-01-2006, 07:27 PM
  4. Replies: 4
    Last Post: 03-17-2006, 12:58 AM
  5. IFRAME/HTML Problem of the century - ahhh!!
    By bearcatmonkey2001 in forum Web Design and Content
    Replies: 30
    Last Post: 07-05-2004, 02:18 PM

Posting Permissions

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