Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #12044

Re: Properties of contentDocument

From Jake Jarvis <pig_in_shoes@yahoo.com>
Newsgroups comp.lang.javascript
Subject Re: Properties of contentDocument
Date 2012-02-22 15:44 +0100
Message-ID <9qkd9bFdeuU1@mid.uni-berlin.de> (permalink)
References <ad554ea2-0f1d-4ead-986e-b9798d589316@9g2000yqo.googlegroups.com>

Show all headers | View raw


On 22.02.2012 14:55, wrote Captain Paralytic:
> 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?

The following links appear relevant

Gecko:
https://developer.mozilla.org/en/DOM/document.height

WebKit:
http://trac.webkit.org/changeset/100847

-- 
Jake Jarvis

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Properties of contentDocument Captain Paralytic <paul_lautman@yahoo.com> - 2012-02-22 05:55 -0800
  Re: Properties of contentDocument Jake Jarvis <pig_in_shoes@yahoo.com> - 2012-02-22 15:44 +0100
    Re: Properties of contentDocument Captain Paralytic <paul_lautman@yahoo.com> - 2012-02-22 07:17 -0800
      Re: Properties of contentDocument Jake Jarvis <pig_in_shoes@yahoo.com> - 2012-02-22 16:38 +0100
        Re: Properties of contentDocument Captain Paralytic <paul_lautman@yahoo.com> - 2012-02-22 07:58 -0800

csiph-web