RSS LOGORss   Welcome Guest  Login Register
Welcome to our Blogs
Back Back
Subject


mag
2008/06/09 04:56AM
Maximize IE 7 (IE7) Window      Number of views: 2241

 

Today, I faced a javascript problem with a friend, he wanted to maximize a window (IE7) with javascript, but it didn't work,

so, after some search we found it.

http://codingforums.com/showthread.php?t=131300

(onload event in the BODY tag)

<script>
function fullScreen() {
  xs = screen.availWidth;
  ys = screen.availHeight;
window.moveTo(0,0);
  window.resizeTo(xs, ys);
  }
</script>

 

UPDATE

This was copied from Programmers Heaven website,

<script language="JavaScript1.2">
top.window.moveTo(0,0);
if (document.all)
   { top.window.resizeTo(screen.availWidth,screen.availHeight); }
else if
   (document.layers || document.getElementById)
   {
   if
    (top.window.outerHeight < screen.availHeight || top.window.outerWidth <
screen.availWidth)
     { top.window.outerHeight = top.screen.availHeight;
       top.window.outerWidth = top.screen.availWidth; }
   }
</script>

 

 

Best wishes,