[Javascript] Strange problem with getting a <table> tag's .offsetHeight property.
Nick Fitzsimons
nick at nickfitz.co.uk
Tue Oct 3 07:38:34 CDT 2006
On 3 Oct 2006, at 11:39, Matt Barton wrote:
> This works fine for all of my users, apart from a couple of new
> laptops that use widescreen displays, and where the users have a
> larger than normal DPI setting on their displays. In these cases
> the offsetHeight property is returning a value a good deal smaller
> than it should be.
>
> Two different systems, running the same OS (WinXP, SP2), the same
> browser (IE6), the same DPI (133), one with a widescreen display,
> and one with a regular display, return different values for
> offsetHeight when calculating the height of identical tables. The
> only difference I can see between the systems is the widescreen-
> ness of the monitor.
>
> If the user with the widescreen laptop changes his DPI to the
> standard 96, it behaves normally, returning values consistent with
> the regular systems.
>
Not sure if this will help (some examples of the values you are
seeing would be helpful, or even better a link to a test page hosted
externally) but IE has a non-standard window.screen property, which
contains information about the DPI of the display. These may allow
you to calculate the actual value from the returned value. Have a
look at <http://msdn.microsoft.com/workshop/author/dhtml/reference/
objects/obj_screen.asp > and the deviceXDPI, deviceYDPI, logicalXDPI
and logicalYDPI properties.
HTH,
Nick.
--
Nick Fitzsimons
http://www.nickfitz.co.uk/
More information about the Javascript
mailing list