Click to See Complete Forum and Search --> : controlling browser window on load


djack
05-30-2003, 02:29 PM
I want to insure that the browser window is maximized when a certain page is selected. How is this accomplished?

khalidali63
05-30-2003, 02:32 PM
Here is an example

http://68.145.35.86/skills/javascripts/WindowOpenFullScreen.html

diamonds
05-30-2003, 03:31 PM
winW = (document.all)?screen.width:window.screen.availWidth;
winH = (document.all)?screen.height:window.screen.availHeight;
popupWin.resizeTo(winW,winH);
popupWin.moveTo(0,0);

what does this do?

popupWin.resizeTo(winW,winH); //resizes the browser
popupWin.moveTo(0,0); // moves the browser to the upper left.

I'm assuming you know what comments are ;)

diamonds
05-30-2003, 03:41 PM
here is the official working code:


<html>
<head>
<script>
winW = (document.all)?screen.width:window.screen.availWidth;
winH = (document.all)?screen.height:window.screen.availHeight;
function size(){
self.resizeTo(winW,winH);
self.moveTo(0,0);
}
</script>
</head>
<body onload="size()">
diden't size? click <a href="javascript:;" onclick="size()">here</a>
</body>
</html>


Cool?:D

djack
05-30-2003, 05:59 PM
Excellent!!! Thank you guys.