[Javascript] Re: Getting the width property of div

Paul Novitski paul at novitskisoftware.com
Tue Apr 5 16:03:17 CDT 2005


At 01:40 PM 4/5/2005, Dash wrote:
>do the people that come up with the standards for these things, have a 
>motto of "everyone likes a challenge, and a damn hard one at that" or 
>something?


<smile />  I imagine that the W3C designers are fraught with angst and torn 
by dilemma.  If they could simply start from scratch and design a clean 
system without having to accommodate legacy user-agents, what a different 
field this would be!  Then they'd only have to argue with one another about 
what's best instead of also constantly having to compromise with 
yesterday's (and today's!) oogly blunders and myriad development paths.

In the case of obj.style.width vs. obj.offsetWidth, however, I think it's 
more a matter of us learning to memorize a zillion minute rules.  I may 
want to know what width, if any, was applied to an element through styling 
and not what it's actual width is, or I may want to know its width without 
regard to its styling.  If I'm right about the difference, it's no mere 
insignificant annoyance.  It's our job to ask the machine the right 
questions to get the answers we seek.  [Perhaps more like poking a stick 
into a roiling mass of spiked tentacles and learning to dodge flying death.]

Paul 





More information about the Javascript mailing list