Properties of contentDocument

Discussion in 'Javascript' started by Captain Paralytic, Feb 22, 2012.

  1. For years Joomla has had a small script used to adjust the hight of a
    frame:
    function iFrameHeight() {
    var h = 0;
    if ( !document.all ) {
    h = document.getElementById('blockrandom').contentDocument.height;
    document.getElementById('blockrandom').style.height = h + 60 + 'px';
    } else if( document.all ) {
    h = document.frames('blockrandom').document.body.scrollHeight;
    document.all.blockrandom.style.height = h + 20 + 'px';
    }
    }

    Just recently it has stopped working in FF & Chrome. I have altered it
    to use .contentDocument.body.scrollHeight

    But when did contentDocument.height disappear?
     
    Captain Paralytic, Feb 22, 2012
    #1
    1. Advertisements

  2. Captain Paralytic, Feb 22, 2012
    #2
    1. Advertisements

  3. Many many thanks. Have bookmarked them for future use.
     
    Captain Paralytic, Feb 22, 2012
    #3
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.