June 11, 2000 - Maximizing a Window
June 11, 2000 Maximizing a Window Tips: June 2000
Yehuda Shiran, Ph.D.
|
<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>
Notice that the resizeTo()
method refers to the dimensions of the entire window (outer-dimensions).