Re: help with document height/width
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Thu, 08 Oct 2009 15:18:44 +0200
Garrett Smith wrote:
Thomas 'PointedEars' Lahn wrote:
Adam Yee wrote:That sounds a little condescending and inflammatory.
I can't seem to get IE8 to create a working clientHeight or
clientWidth. I've tried a few combinations with varied results, but
nothing that works all the way like in FF.
You don't seem to have powered-up your brain before trying at all, so the
results are unsurprising.
It's the hard truth. The OP hasn't done *any* homework before, just copy-
and-pray.
It could end up with you the center of negative attention, as happened
recently.
This is not a help desk, so I don't particularly care what oversensitive
people might think of my postings.
I've tried these (probably a couple others also):
doc_width = document.documentElement.clientWidth;
doc_height = document.documentElement.clientHeight;
Works in Standards Compliance Mode.
doc_width = document.body.offsetWidth + document.body.offsetLeft;
doc_height = document.body.offsetHeight + document.body.offsetTop;
Care to explain what the computed left/top coordinates would have to do
with the width and height of an element?
var doc_height = (document.height !== undefined) ? document.height :
document.body.offsetHeight;
Document objects have no height as they have no graphical representation.
No, but there is a "height" property of document in a few browsers, way
back to NS4, perhaps earlier.
And perhaps irrelevant today?
var doc_width = (document.width !== undefined) ? document.width :
document.body.offsetWidth;
Neither do they have a width.
Can anyone help me out with correct object creation for height and
width (for IE)?
The objects are there, they do not need to be created. RTFM.
That doesn't seem very helpful.
That's too bad. They should ask for a refund.
How could anyone know which manual you are thinking of?
By reading the FAQ and following its recommendations. It is not exactly new
here.
Your posting consisted of nothing but irrelevance. And where is your
counter-suggestion to solve the OP's problem? You should read the FAQ and
adhere to what you are maintaining, otherwise you could rightfully be called
a hypocrite.
PointedEars
--
Danny Goodman's books are out of date and teach practices that are
positively harmful for cross-browser scripting.
-- Richard Cornford, cljs, <cife6q$253$1$8300dec7@xxxxxxxxxxxxxxxx> (2004)
.
- Follow-Ups:
- Re: help with document height/width
- From: Adam Yee
- Re: help with document height/width
- References:
- help with document height/width
- From: Adam Yee
- Re: help with document height/width
- From: Thomas 'PointedEars' Lahn
- Re: help with document height/width
- From: Garrett Smith
- help with document height/width
- Prev by Date: Re: Quick question about using a table of text input fields within a javascrip function
- Next by Date: ##### 2009 Puma Shoes cheap wholesale with high quality at website www.fjrjtrade.com <paypal payment>
- Previous by thread: Re: help with document height/width
- Next by thread: Re: help with document height/width
- Index(es):
Relevant Pages
|
Loading