Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximizing the browser window when the page loads?

Status
Not open for further replies.

james0816

Programmer
Jan 9, 2003
295
0
0
US
I've looked at a couple of the threads on this and even tried the one that talked about adding a function however, it did not work as the window was still not maximized?

Am I missing something here?
 
I have to say...I have attempted every script I have found here that says this works however, when I load my page, I still have to click the Maximize button in the browser window for it to display properly.
 
James...post what you've tried, and give us some info on browser(s) that you have tried the scripts with.

Mike
 
ok...i found another snippet and tried it...it worked. here it is:

<script language="JavaScript">
<!--

function maximizeWindow() {
if (parseInt(navigator.appVersion)>3) {
if (navigator.appName=="Netscape") {
if (top.screenX>0 || top.screenY>0) top.moveTo(0,0);
if (top.outerWidth < screen.availWidth)
top.outerWidth=screen.availWidth;
if (top.outerHeight < screen.availHeight)
top.outerHeight=screen.availHeight;
}
else {
top.moveTo(-4,-4);
top.resizeTo(screen.availWidth+8,screen.availHeight+8);
}
}
}

//-->
</script>

I call it from the <body> tag with an onload statement.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top