faqts : Computers : Programming : Languages : JavaScript : Windows

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

41 of 141 people (29%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How Do you resize a window to full screen onload?

Feb 24th, 2001 15:09
Tony Crosby,


OK, actually this wasn't that hard to find, I actually meant something 
else which I'm about to ask, but to resize a window this is the code I 
found.
<SCRIPT LANGUAGE="JavaScript">
<!--
function maximizeWin() {
  if (window.screen) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
    window.moveTo(0, 0);
    window.resizeTo(aw, ah);
  }
}
// -->
</SCRIPT>
<FORM><INPUT TYPE="button" VALUE="Maximize" onClick="maximizeWin
()"></FORM>
 Tony