Description: This JavaScript code allows users to resize their browser window by typing the desired dimensions into a prompt.
Try it out
To use this function, simply cut and paste the below code into the header of the page you want users to be able to resize, then provide a link on that page using <a href="javascript:sizebrowser()">.
<SCRIPT LANGUAGE="JavaScript">
<!--
function sizebrowser(){
var intwidth = 0;
var intheight = 0;
intwidth=prompt("Enter desired width for the browser.","");
intheight=prompt("Enter desired height for the browser.","");
intwidth=parseInt(intwidth);
intheight=parseInt(intheight);
if(intwidth>0&&intheight>0)
{window.resizeTo(intwidth,intheight);}
else
{alert("Please specify a desired width and height.");}
}
//-->
</SCRIPT>