Click to See Complete Forum and Search --> : Browser height/width
Dumbass
11-16-2003, 06:27 AM
Is there any way to retrieve the height and width of a browser window?... I don't mean the entire window. Just the actual browser area. For example, in about:blank, the white area.
<-- Sucks at explaining things :P
Anyway, I've tried screen.height and screen.availHeight (and width), but they both return the entire screen height and width, which is not what I'm looking for.
So, can anyone help me?
Charles
11-16-2003, 07:04 AM
You're looking for "Window.innerWidth" and "Window.innerHeight". See http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/window.html#1202410. It won't work in MSIE, but all JavaScript will fail a good bit of the time.
Dumbass
11-16-2003, 03:47 PM
Is there anything that will work in MSIE?
Dumbass
11-17-2003, 03:34 AM
Someone?
MaxDax
12-19-2003, 10:51 PM
Hi
Here's an idea that might work. Center a 1 pixel invisble gif at the top of the page and then find it's left co ordinate and multiply by 2
MaxDax
Khalid Ali
12-19-2003, 11:31 PM
Originally posted by Dumbass
Someone?
The script on this page (http://www.webapplikations.com/pages/html_js/window/OpenCentralizedPopupWindow.html) calculates windows current size by getting the browsers windows actual size....
I am sure it will help.It works for both IE and NS6+(mozilla based) browsers
IE/Moz, not including scrollbar
document.body.clientWidth
document.body.clientHeight
NS
window.innerHeight
window.innerWidth