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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximising a Browser 1

Status
Not open for further replies.

inta

Technical User
Aug 2, 2001
13
AU
Is there a method to invoke the maximize browser function without using moveTo(0,0) and resizeTo(screen.availWidth,screen.availHeight)

IE. Something along the lines of window.maximize

I am looking for this because when you use resizeTo, the browser isn't maximized, merely resized to the screen height and width.

Ideally, I would like the method to work with IE and NS from versions 4 up.

Thankyou for your assistance.
 
All of my JavaScript references do not have anything regarding physically maximizing a window.

TW
 
If only there was a function called window.max! Oh well, untill then, I have this to offer:

Code:
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);
  }
 }
}
Grabbed from:
I've used it before, and it gets you as close to maximized as you can get.
 
Try this one

<script>
<!--
function maxwin(targeturl){
window.open(targeturl,&quot;&quot;,&quot;fullscreen,scrollbars&quot;)
}
//-->
</script>

<form>
<input type=&quot;button&quot; onClick=&quot;maxwin(' value=&quot;Open window&quot;>
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top