Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.java.* > Newsgroup comp.lang.javascript

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2012, 12:55 PM
Captain Paralytic
Guest
 
Posts: n/a
Default Properties of contentDocument

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?
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 02-22-2012, 02:17 PM
Captain Paralytic
Guest
 
Posts: n/a
Default Re: Properties of contentDocument

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!
Reply With Quote
  #3 (permalink)  
Old 02-22-2012, 02:58 PM
Captain Paralytic
Guest
 
Posts: n/a
Default Re: Properties of contentDocument

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.
Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 06:09 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.