When looking for the bodys width/height in IE6 using:
DynAPI.document.getWidth()
DynAPI.document.getHeight()
if the document has a valid doctype either XHTML or 4 +
IE6 runs in a CSS1 compatible strict mode when certain
doctypes are present. In that case the documentElement
represents the canvas, not the body element therefore
findimensions() was returning 0 using
this.doc.body.clientHeight and a strict/xhtml doctype
added a check for wether the document was in
strictmode or not and used
this.doc.documentElement.clientHeight
basically if you write HTML or XHTML using doctypes
and you use the documents body's width/height in your
code you will need this for correct display in IE6
replacement dyndocument.js
Logged In: YES
user_id=164855
Hi,
Have you any idea if IE5/MAC has the same difference when
running under "strict" mode?
I added a test for this in the /tests directory in CVS,
here:
<wrap>
http://cvs.sourceforge.net/cgi-
bin/viewcvs.cgi/~checkout~/dynapi/dynapi/tests/doctype_clien
tHeight.html?rev=HEAD&content-type=text/html
</wrap>
Wouldn't it be best to do the doctype-sniffing in
browser.js?
If so, like this:
if(is.strict&&is.IE6)
or like this? :
if(is.IE6Strict)?
Richard.
Logged In: YES
user_id=176079
With regard to the strict mode on a mac, not having access
to a mac i couldnt test this behaviour in ie5 , i believe
this behaviour only applies to ie6.
re the check, i put the check within the dyndocument to try
and keep the change to one file, it might be worth adding
this check to the browser.js and use if(is.ie6strict)
method as mozilla isnt affected and believed ie5 on a mac
isnt either, tho this should really be confirmed before
committing these changes to the cvs.
thanks
... sh0rtie
Logged In: YES
user_id=46384
i've tested on mac ie5:
document.body.clientHeight = 466
document.compatMode = undefined
document.documentElement.clientHeight = undefined
which leads to this is ie6 only.
i think a is.strict is best while other browsers
go into strict mode aswell, and then we can use
is.strict to identify different modes.
Logged In: YES
user_id=164855
Thanks for testing that.
<<i think a is.strict is best while other browsers
<<go into strict mode aswell, and then we can use
<<is.strict to identify different modes.
That would mean we would have to do if (is.strict&&is.IE6)
Is that the best way?
Bear in mind that the code to test for strict mode in
IE5/Mac, and Mozilla is a lot more involved than for IE6.
Should we add all that in now, or just the IE6 part to
start with?
Also, I noticed that HEX colors have to be started with the
# sign, or they don't show in IE6 Strict mode.
Something else to keep in mind.
Logged In: YES
user_id=46384
if this.strict could test for mozilla's strict mode aswell
i think this would be the best.
can't we use the test you had on
http://www.richardinfo.com/case_studies/doctypes.html
to detect which mode ie5mac, ie6 or mozilla is in?
and add this to browser.js
Logged In: YES
user_id=373738
THANK YOU THANK YOU THANK YOU!!!
There is also a bug in IE6 that returned an incorrect
clientHeight and clientWidth. Your file fixes that error!
Thank you very much!
Logged In: NO
The Alert box reads:
document.body.clientHeight = 438
document.compatMode = undefined
document.documentElement.clientHeight = undefined
Using IE 5.2.1 for Mac OS X 10.1.5 on
an iMac at 800 x 600 screen resolution
Logged In: NO
Mac os 10.2, IE 5.2.2...
document.body.clientHeight = 629
document.compatMode = undefined
document.documentElement.clientHeight = undefined
629 is in fact the height of the window's rendering area.