Page 1 of 1
Maximize browser window
Posted: Sun Apr 13, 2003 2:21 pm
by desmondlk
Dear all,
May I know to maximize the browser window to fix the screen by using javascript?
Please help. Thanks in advance.
Posted: Sun Apr 13, 2003 2:52 pm
by volka
try
Code: Select all
<html>
<head>
</head>
<body>
<script type="text/javascript">
var nSW = screen.availWidth || screen.width;
var nSH = screen.availHeight || screen.height;
window.moveTo(0,0);
window.resizeTo(nSW, nSH);
</script>
test
</body>
</html>
and please do not use it to bother somebody

(my mozilla e.g. is blocking it)
Posted: Sun Apr 13, 2003 4:09 pm
by twigletmac
volka wrote:and please do not use it to bother somebody

(my mozilla e.g. is blocking it)
I really must play with Mozilla more - always end up in IE 'cause that's what the majority of testing at work has to be done in...
However, even without being able to block that sort of maximisation I do tend to immediately leave sites who force me to have my screen at a particular size unless I'm really, really interested in the content. Even then I'm unlikely to stick around for long.
Mac