Firefox / Chrome issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Grimmerson
    New Member
    • Apr 2012
    • 5

    Firefox / Chrome issues

    Hi guys

    I have a piece of code that is working on internet explorer for pc but not mac and not on firefox or chrome.

    Do you have any suggestions please.

    Code:
    <script>
    function resizeIframe(main) {
    if(self==parent) return false; /* Checks that page is in iframe. */
    else if(document.getElementById&&document.all) /* Sniffs for IE5+.*/
    
    var FramePageHeight = framePage.scrollHeight + 10; /* framePage
    is the ID of the framed page's BODY tag. The added 10 pixels prevent an
    unnecessary scrollbar. */
    
    parent.document.getElementById(main).style.height=FramePageHeight;
    /* "iframeID" is the ID of the inline frame in the parent page. */
    }
    </script>
    <body id="framePage" onload="resizeIframe('main')">
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    FramePageHeight is not defined in non-IE browsers (maybe except Opera) since document.all is IE-only.

    Comment

    Working...