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


Groups > comp.lang.javascript > #12043 > unrolled thread

Properties of contentDocument

Started byCaptain Paralytic <paul_lautman@yahoo.com>
First post2012-02-22 05:55 -0800
Last post2012-02-22 07:58 -0800
Articles 5 — 2 participants

Back to article view | Back to comp.lang.javascript


Contents

  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

#12043 — Properties of contentDocument

FromCaptain Paralytic <paul_lautman@yahoo.com>
Date2012-02-22 05:55 -0800
SubjectProperties of contentDocument
Message-ID<ad554ea2-0f1d-4ead-986e-b9798d589316@9g2000yqo.googlegroups.com>
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?

[toc] | [next] | [standalone]


#12044

FromJake Jarvis <pig_in_shoes@yahoo.com>
Date2012-02-22 15:44 +0100
Message-ID<9qkd9bFdeuU1@mid.uni-berlin.de>
In reply to#12043
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

[toc] | [prev] | [next] | [standalone]


#12045

FromCaptain Paralytic <paul_lautman@yahoo.com>
Date2012-02-22 07:17 -0800
Message-ID<437b984c-a883-4cd1-91be-829869d657f2@f30g2000yqh.googlegroups.com>
In reply to#12044
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').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

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.scrollHeight call either!

[toc] | [prev] | [next] | [standalone]


#12046

FromJake Jarvis <pig_in_shoes@yahoo.com>
Date2012-02-22 16:38 +0100
Message-ID<9qkgg0F6upU1@mid.uni-berlin.de>
In reply to#12045
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/

-- 
Jake Jarvis

[toc] | [prev] | [next] | [standalone]


#12048

FromCaptain Paralytic <paul_lautman@yahoo.com>
Date2012-02-22 07:58 -0800
Message-ID<bc634589-08cc-4c88-a1b8-c586ef0e4ec3@p13g2000yqd.googlegroups.com>
In reply to#12046
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.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web