We can resize window to a fixed width and height by using window resizing function , here is the code.
We will try to develop an example in which by click of a button we will resize window to 300 width and 300 height

demo of resizeTo()

Here is the code.
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<title>Demo of resizeTo to fix width and height of a window</title>
<script language=javascript>

function to_close(){
tm.close();q }

function to_open(){"moveby-child.htm","Ratting","width=250,height=150,0,top=200,status=0,");

function to_resizeTo(){
tm.focus(); // Keeping the focus on small window


<input type="button" name="btn" value="Open" onclick="to_open()";>
<input type="button" name="btn" value="Close" onclick="to_close()";>
<input type="button" name="btn" value="Resize To" onclick="to_resizeTo()";>

Return to <a href=resizeto.php>resizeTo</a> | <a href=window-object.php>window object</a>


The code for child window is available at moveBy
Your Rating

Post Comment This is for short comments only. Use the forum for more discussions.

HTML MySQL PHP JavaScript ASP Photoshop Articles FORUM . Contact us
©2000-2019 All rights reserved worldwide Privacy Policy Disclaimer