I've been trying document.body.clientHeight and document.body.clientWidth but I'm running into errors. 1. clientWidth returns my screen with but clientHeight is returning a '0' Why is this? 2. If I resize my browser window clientWidth returns a smaller number. How would I make it so it returns the width of the entire users screen (include the parts that are hidden because the window is smaller?) Thanks.
I think you are trying to get screen resolution here. Did you try screen.width and screen.height methods? You can also try window.outerWidth and window.outerHeight.
Thanks. It worked. Do you know how to check a users connection speed with javascript without acctually have to download something?