|
|||
|
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').contentDocu ment.height; document.getElementById('blockrandom').style.heigh t = h + 60 + 'px'; } else if( document.all ) { h = document.frames('blockrandom').document.body.scrol lHeight; 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? |
|
|
||||
|
||||
|
|
|
|||
|
On Feb 22, 2:44*pm, Jake Jarvis <pig_in_sh...@yahoo.com> wrote:
> 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').contentDocu ment.height; > > * * * * * *document.getElementById('blockrandom').style.heig ht = h + 60 + 'px'; > > * *} else if( document.all ) { > > * * * * * *h = document.frames('blockrandom').document.body.scrol lHeight; > > * * * * * *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 Thanks Jake. How did you happen upon them. I tried various searches but did not bring those up? To compound the problem, IE9 no longer seems to support the document.frames('blockrandom').document.body.scrol lHeight call either! |
|
|||
|
On Feb 22, 3:38*pm, Jake Jarvis <pig_in_sh...@yahoo.com> wrote:
> On 22.02.2012 16:17, wrote Captain Paralytic: > <...> > > > Thanks Jake. How did you happen upon them. I tried various searches > > but did not bring those up? > > <...> > > I looked in the "Gecko DOM Reference" on the Mozilla Developer Network > (https://developer.mozilla.org/En/DOM), and in the wiki that's linked as > "Web Developer Resources" fromhttp://www.webkit.org/ > > -- > Jake Jarvis Many many thanks. Have bookmarked them for future use. |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|