...

View Full Version : Complete List



tison
04-13-2005, 07:25 PM
Is there a discussion/explanation of all the possible DOM Objects??

Well if not, Here's the first question: What is the difference between height and offsetHeight ?

hemebond
04-13-2005, 10:04 PM
Gecko DOM Reference (http://www.mozilla.org/docs/dom/domref/).

Kor
04-14-2005, 10:26 AM
1. height is a CSS attribute. It is a full dynamic attrubte, thus it must be previosely set to be retreived later.

Syntax
object.style.height (if locally set)
if embeded or external:
window.getComputedStyle(object,null).getPropertyValue(height) //for Moz
object.currentStyle[height]//if IE

2. offsetHeight is a readonly attrubte. It shows the height of an object event there was no previous dimension set up.

Syntax
object.offsetHeight

3. On the other hand height might be as well the HTML attribute. This case, the syntax is

object.getAttribute('height')

this is also a dynamic attribute. To manipulate it use setAttribute() method

object.setAttribute('height','400')



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum