Properties of contentDocument

Captain Paralytic

Usenet Archive
Joined
Feb 9, 2007
Messages
170
Reaction score
0
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?
 

Jake Jarvis

Usenet Archive
Joined
Aug 11, 2009
Messages
97
Reaction score
0
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'; } } ...

The following links appear relevant

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

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

Jake Jarvis

Usenet Archive
Joined
Aug 11, 2009
Messages
97
Reaction score
0
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" from http://www.webkit.org/
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
548,049
Messages
3,104,245
Members
248,133
Latest member
DujonT

Latest Threads

Top