Go Back   CodingForums.com > :: Client side development > JavaScript programming

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 07-25-2010, 04:44 AM   PM User | #1
brem13
New to the CF scene

 
Join Date: Jul 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
brem13 is an unknown quantity at this point
Internet Explorer problem getting clientHeight

hey, im having an issue getting the screen size of my browser in IE, it works fine in firefox and safari using window.innerHeight but when i try to use document.body.clientHeight, it doesnt work, the width works, but height just gives me back a 0. any help? this is the code

Code:
var sHeight=document.body.clientHeight;
brem13 is offline   Reply With Quote
Old 07-25-2010, 08:13 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
It varies among browsers. This might help you

http://andylangton.co.uk/articles/ja...ze-javascript/

It has IE6 in the comments but they still apply to other IE versions.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Users who have thanked _Aerospace_Eng_ for this post:
brem13 (07-25-2010)
Old 07-25-2010, 10:48 PM   PM User | #3
brem13
New to the CF scene

 
Join Date: Jul 2010
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
brem13 is an unknown quantity at this point
thank you, it works now!
brem13 is offline   Reply With Quote
Reply

Bookmarks

Tags
height, screen, size

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 03:32 PM.


Advertisement
Log in to turn off these ads.