Go Back   CodingForums.com > :: Client side development > JavaScript programming > DOM and JSON scripting

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 04-13-2005, 07:25 PM   PM User | #1
tison
New to the CF scene

 
Join Date: Apr 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
tison is an unknown quantity at this point
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 ?
tison is offline   Reply With Quote
Old 04-13-2005, 10:04 PM   PM User | #2
hemebond
Senior Coder

 
Join Date: Jul 2004
Location: New Zealand
Posts: 1,315
Thanks: 0
Thanked 2 Times in 2 Posts
hemebond is an unknown quantity at this point
Gecko DOM Reference.
__________________
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).
hemebond is offline   Reply With Quote
Old 04-14-2005, 10:26 AM   PM User | #3
Kor
Red Devil Mod


 
Kor's Avatar
 
Join Date: Apr 2003
Location: Bucharest, ROMANIA
Posts: 8,478
Thanks: 58
Thanked 379 Times in 375 Posts
Kor has a spectacular aura aboutKor has a spectacular aura about
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')
__________________
KOR
Offshore programming
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

Last edited by Kor; 04-14-2005 at 11:31 AM..
Kor is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:57 PM.


Advertisement
Log in to turn off these ads.