...

View Full Version : problem getting clientHeight



brem13
07-25-2010, 04:44 AM
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


var sHeight=document.body.clientHeight;

_Aerospace_Eng_
07-25-2010, 08:13 AM
It varies among browsers. This might help you

http://andylangton.co.uk/articles/javascript/get-viewport-size-javascript/

It has IE6 in the comments but they still apply to other IE versions.

brem13
07-25-2010, 10:48 PM
thank you, it works now!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum