Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!fu-berlin.de!uni-berlin.de!not-for-mail From: Jake Jarvis Newsgroups: comp.lang.javascript Subject: Re: Properties of contentDocument Date: Wed, 22 Feb 2012 15:44:11 +0100 Lines: 29 Message-ID: <9qkd9bFdeuU1@mid.uni-berlin.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de xH6mlu19itqe1SdVb2OWXwc9qLknR7Sc/v2tWA4BirHDKFvqM= User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:12044 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