Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » JavaScript

document.clientHeight

 
Jump to:  
 
dhtml
PostPosted: Sat Sep 13, 2008 11:27 pm    Post subject: document.clientHeight
       
Other than Safari 2, what other browsers that support
document.clientHeight ?

I would guess some KHTML did.

I have found the feature, when it is present, to reliably provide the
height of the viewport, excluding scrollbars.
 

 
Jorge
PostPosted: Sun Sep 14, 2008 8:16 am    Post subject: Re: document.clientHeight
       
On Sep 14, 3:27 am, dhtml <dhtmlkitc...@gmail.com> wrote:
Quote:
Other than Safari 2, what other browsers that support
document.clientHeight ?

I would guess some KHTML did.

I have found the feature, when it is present, to reliably provide the
height of the viewport, excluding scrollbars.

(element).clientHeight
document.**body**.clientHeight

All the browsers support that, I think.

site:opera.com "clientHeight"
site:mozilla.org "clientHeight"
site:microsoft.com "clientHeight"
site:apple.com "clientHeight"
site:webkit.org clientHeight

--
Jorge.
 

 
dhtml
PostPosted: Sun Sep 14, 2008 1:53 pm    Post subject: Re: document.clientHeight
       
Jorge wrote:
Quote:
On Sep 14, 3:27 am, dhtml <dhtmlkitc...@gmail.com> wrote:
Other than Safari 2, what other browsers that support
document.clientHeight ?

I would guess some KHTML did.

I have found the feature, when it is present, to reliably provide the
height of the viewport, excluding scrollbars.

(element).clientHeight
document.**body**.clientHeight

All the browsers support that, I think.


Most browsers support (element).clientHeight. But document is not an
element. Not all browsers support document.clientHeight.


Quote:

--
Jorge.
 

 
Jorge
PostPosted: Sun Sep 14, 2008 4:53 pm    Post subject: Re: document.clientHeight
       
On Sep 14, 5:53 pm, dhtml <dhtmlkitc...@gmail.com> wrote:
Quote:

Most browsers support (element).clientHeight. But document is not an
element. Not all browsers support document.clientHeight.


javascript:alert(document.clientHeight)

In a Mac: Opera 9.5x, FF2&3, Safari 3&4, Camino, IE5.23, NS9, iCab3 --
Quote:
undefined.

--
Jorge.
 

 
Andrew Poulos
PostPosted: Mon Sep 15, 2008 11:18 am    Post subject: Re: document.clientHeight
       
Arun wrote:
Quote:
On Sep 14, 5:53 pm, Jorge wrote:
On Sep 14, 5:53 pm, dhtml wrote:
Most browsers support (element).clientHeight. But document is not an
element. Not all browsers support document.clientHeight.
javascript:alert(document.clientHeight)

In a Mac: Opera 9.5x, FF2&3, Safari 3&4, Camino, IE5.23, NS9, iCab3 --

undefined.

document.clientHeight is not widely supported (actually browsers that
support it are deprecating its functionality) and it is recommended to
use document.body.clientHeight which is supported in all browsers.

document.clientHeight, in fact, doesn't make any sense as document is
not an element and merely a placeholder for the DOM tree returned from
the underlying markup and is invisible to one's eyes. You don't have
heights for objects that are not even visible.


Doesn't IE 6, in strict mode, use document.documentElement.clientHeight?

Andrew Poulos
 

 
Arun
PostPosted: Mon Sep 15, 2008 12:59 pm    Post subject: Re: document.clientHeight
       
On Sep 14, 5:53 pm, Jorge wrote:
Quote:
On Sep 14, 5:53 pm, dhtml wrote:
Most browsers support (element).clientHeight. But document is not an
element. Not all browsers support document.clientHeight.

javascript:alert(document.clientHeight)

In a Mac: Opera 9.5x, FF2&3, Safari 3&4, Camino, IE5.23, NS9, iCab3 --

undefined.

document.clientHeight is not widely supported (actually browsers that
support it are deprecating its functionality) and it is recommended to
use document.body.clientHeight which is supported in all browsers.

document.clientHeight, in fact, doesn't make any sense as document is
not an element and merely a placeholder for the DOM tree returned from
the underlying markup and is invisible to one's eyes. You don't have
heights for objects that are not even visible.

;) Cheers,
Arun
 

 
Henry
PostPosted: Mon Sep 15, 2008 3:36 pm    Post subject: Re: document.clientHeight
       
On Sep 15, 2:18 pm, Andrew Poulos wrote:
Quote:
Arun wrote:
snip
... and it is recommended to use document.body.clientHeight
which is supported in all browsers.
snip
Doesn't IE 6, in strict mode, use
document.documentElement.clientHeight?

It would be better to call it "standards", "CSS" or "CSS1Compat" mode
(the first being normal and the last the internal name
(document.compatMode)) and its opposite something like "quirks" or
"BackCompat" mode. Referring to it as "strict" tends to encourage the
misconception that it has some relationship with the distinction
between "strict" and "transitional" in HTML (and when ECMAScript
introduces a "strict" mode (in the next version) there would be
additional confusion).

But yes, when (document.compatMode == 'CSS1Compat') IE 6 client
dimensions are to be found on the documentElement not the body (and
the values read from the body element will be very wrong). But this is
not necessarily true of other browsers that expose a -
document.compatMode - property.
 

 
dhtml
PostPosted: Tue Sep 16, 2008 4:10 pm    Post subject: Re: document.clientHeight
       
Arun wrote:
Quote:
On Sep 14, 5:53 pm, Jorge

wrote:
Quote:
On Sep 14, 5:53 pm, dhtml wrote:
Most browsers support (element).clientHeight. But document is not an
element. Not all browsers support document.clientHeight.
javascript:alert(document.clientHeight)

In a Mac: Opera 9.5x, FF2&3, Safari 3&4, Camino, IE5.23, NS9, iCab3 --

undefined.

document.clientHeight is not widely supported (actually browsers that
support it are deprecating its functionality) and it is recommended to
use document.body.clientHeight which is supported in all browsers.


It was removed from Safari. Safari 2.0.4 had it. Not sure which other
browsers have it (probably some KHTML). Seems to be quite rare.




Quote:
document.clientHeight, in fact, doesn't make any sense as document is
not an element and merely a placeholder for the DOM tree returned from
the underlying markup and is invisible to one's eyes. You don't have
heights for objects that are not even visible.



It could be argued that documentElement.clientHeight returning the
height of the viewport (sans horz scrollbar) makes less sense. It is
ambiguous and doesn't work that way in all browsers.

Should clientHeight return the cleintHeight of the element? That's what
recent past versions of Opera do. What should
documentElement.scrollHeight return? Should it return the scrollHeight
of the html element or the height of the viewport? What about
documentElement.clientTop, or offsetTop?

The viewport is not the documentElement. There's a lot of special
treatment given to the root node for functionality of the viewport. Even
body gets some special treatment, too (overflow, background, event
handlers).

Garrett

Quote:
Wink Cheers,
Arun
 

 
dhtml
PostPosted: Tue Sep 16, 2008 6:05 pm    Post subject: Re: document.clientHeight
       
dhtml wrote:
Quote:
Arun wrote:
On Sep 14, 5:53 pm, Jorge wrote:
On Sep 14, 5:53 pm, dhtml wrote:
Most browsers support (element).clientHeight. But document is not an
element. Not all browsers support document.clientHeight.
javascript:alert(document.clientHeight)

In a Mac: Opera 9.5x, FF2&3, Safari 3&4, Camino, IE5.23, NS9, iCab3 --

undefined.

document.clientHeight is not widely supported (actually browsers that
support it are deprecating its functionality) and it is recommended to
use document.body.clientHeight which is supported in all browsers.


It was removed from Safari. Safari 2.0.4 had it. Not sure which other
browsers have it (probably some KHTML). Seems to be quite rare.




document.clientHeight, in fact, doesn't make any sense as document is
not an element and merely a placeholder for the DOM tree returned from
the underlying markup and is invisible to one's eyes. You don't have
heights for objects that are not even visible.



It could be argued that documentElement.clientHeight returning the
height of the viewport (sans horz scrollbar) makes less sense. It is
ambiguous and doesn't work that way in all browsers.

Should clientHeight return the cleintHeight of the element? That's what
recent past versions of Opera do. What should
documentElement.scrollHeight return? Should it return the scrollHeight
of the html element or the height of the viewport?

(I meant "document's scrollable area").......^^^

What about
Quote:
documentElement.clientTop, or offsetTop?

The viewport is not the documentElement. There's a lot of special
treatment given to the root node for functionality of the viewport. Even
body gets some special treatment, too (overflow, background, event
handlers).

Garrett

;) Cheers,
Arun
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

koszulki bieżnia kettler marmin bay Leczenie niepłodności konferencje i szkolenia