iframe resizing on opera problem

Discussion in 'Javascript' started by Paul Fi, Nov 18, 2004.

  1. Paul Fi

    Paul Fi Guest

    Can someone help me here because this is really killing me!

    the problem is, i have this javascript code in my aspx page that i want
    it to work on almost all browsers, especially opera and safari :

    function resize(){
    displayFrm = document.getElementById("ifrmDisplay");

    innerDoc = (displayFrame.contentDocument) ?displayFrm.contentDocument :
    displayFrm.contentWindow.document;

    objToResize = (displayFrm.style) ? displayFrm.style : displayFrm;

    objToResize.height = innerDoc.body.scrollHeight;
    }

    the code above gets called every time a new page is loaded inside the
    iframe (ifrmDisplay) what its doing is resizing the iframe so it can
    have the same size as the page inside it, so i can eliminate the need
    for vertical scroller for the iframe, i assumed that it works on opera
    and IE at the same time, when i tried it out, it worked on IE but not on
    opera. after lot of time in researching how i can get workaround this
    issue with opera, that is the best possible solution i have and yet it
    doesnt work. so i gave up and asking you if you can help me out here ,
    coz this is jst driving me crazy!

    the problem is im not a javascript expert, to be honest i jst started
    doing javascripts about two days ago, that is why im in need for help

    by the way, here is inner html for the iframe if its any use

    <iframe id="ifrmDisplay" style="Z-INDEX: 99; LEFT: 187px; WIDTH: 567px;
    POSITION: absolute; TOP: 136px; HEIGHT: 408px" src="" scrolling="no"
    onload="resize();">
    </iframe>




    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Paul Fi, Nov 18, 2004
    #1
    1. Advertising

  2. Hello

    I have tried to give you some pointers in response to one of your previous posts.

    Hope these give you something to work on.

    Julian
     
    Julian Turner, Nov 19, 2004
    #2
    1. Advertising

  3. Paul Fi

    Paul Fi Guest

    cheers mate!

    yes well, it didnt help much but it gave me some ideas, might help in
    the future!

    thanks anyways



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Paul Fi, Nov 19, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bob
    Replies:
    24
    Views:
    1,571
  2. Csaba2000

    Button resizing in Opera

    Csaba2000, Sep 18, 2003, in forum: Javascript
    Replies:
    2
    Views:
    119
    Csaba2000
    Sep 18, 2003
  3. Daedalous
    Replies:
    3
    Views:
    789
    Daedalous
    Jan 16, 2004
  4. Pil (Trustworthy from Experience)

    Resizing a div by resizing its borders

    Pil (Trustworthy from Experience), Apr 18, 2009, in forum: Javascript
    Replies:
    9
    Views:
    366
    Proper
    Apr 21, 2009
  5. Proper
    Replies:
    0
    Views:
    209
    Proper
    Apr 18, 2009
Loading...

Share This Page