469,329 Members | 1,417 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,329 developers. It's quick & easy.

el.style.height not working

Hi Folk

Can someone tell me why this simple example is not working (javascript
wise):

http://www.photowarehouse.co.nz/test.html

Thank you
Nicolaas
Apr 23 '07 #1
2 2576
On Apr 23, 6:21 pm, windandwaves <nfranc...@gmail.comwrote:
Hi Folk

Can someone tell me why this simple example is not working (javascript
wise):

http://www.photowarehouse.co.nz/test.html

Thank you
Nicolaas
The reason why this is not working is because the el.style.height is
empty therefore doing parseFloat returns NaN (not a number).
You should use getComputedStyle(el, null) or el.currentStyle (in IE)
to get the height. This will solve your problem.

-Jason

Apr 23 '07 #2
Thank you Jason - that worked!

Apr 26 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Bura Tino | last post: by
4 posts views Thread by Robert Secon | last post: by
3 posts views Thread by charley | last post: by
33 posts views Thread by amerar | last post: by
1 post views Thread by mfurey | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.