Resize Current Window

[Total: 0    Average: 0/5]

This shows how to resize the current window to the size specified.

Body Code:

<script type=text/javascript>
// could set this to the screen dimensions...
var _MIN = 100;
var _MAX = 800;
function resizeMe() {
  var _x = document.f1.x.value?document.f1.x.value:_MAX;
  var _y = document.f1.y.value?document.f1.y.value:_MAX;
  if (_x < _MIN) _x = _MIN;
  if (_x > _MAX) _x = _MAX;
  if (_y < _MIN) _y = _MIN;
  if (_y > _MAX) _y = _MAX;
<form name="f1">
X <input name="x" type="text" value="0"><BR>
Y <input name="y" type="text" value="0">
<input type="button" onclick="resizeMe()" value="RESIZE!">
<script type=text/javascript>
document.write("Min size = "+_MIN+"<BR>");
document.write("Max size = "+_MAX+"<BR>");
<a href="javascript:resizeMe()">Click To Resize With Those Dimensions</a>

Times Viewed: 5

Leave a Reply

Your email address will not be published. Required fields are marked *