Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: Complete List

  1. #1
    New to the CF scene
    Join Date
    Apr 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Complete List

    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 ?

  • #2
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Forget style. Code to semantics. Seperate style from structure, and structure from behaviour.
    I code to specs, and test only in Firefox (unless stated otherwise).

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    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')
    Last edited by Kor; 04-14-2005 at 12:31 PM.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •