Entry
How can I alert someone if their browser window is too small to properly view a site?
Jan 23rd, 2002 02:31
Francesco Defazio, Graham Lawton,
You can control the dimension of a browser window in onLoad event of
body, in this way:
function checkBrowserWindow(){
if(parseInt(document.body.clientWidth)<800 || parseInt
(document.body.clientHeight)<600)
alert('Your browser window is too small!');
}
you can recall this on a resize event of the screen
window.onresize = function (evt) {
checkBrowserWindow();
}
if you want check the resolution of the client monitor the property are:
window.screen.width
window.screen.height
Bye
Francesco Defazio