You are here: irt.org | FAQ | JavaScript | Window | Q432 [ previous next ]
When opening a window use the attribute resizable:
window.open('apage.html','myWIndow','resizable=no');
The code does not work in Internet Explorer - you can maximise the window, and the resizable=no is ignored once you restore the size.
The following was submitted by Henrie
It is possible to 'disable' the minimize and maximize buttons in IE. Use the onresize event to resize the screen back to a size of your choice:
<SCRIPT LANGUAGE="JavaScript"><!-- function scrsize(){ window.resizeTo(800,600); } window.onresize=scrsize; //--></SCRIPT>
The following was submitted by David LEBRET
It is possible in IE to resize the window each time the window is maximized. A maximizing event is detected as a resizing event. The code OnResize="self.resizeTo(WIDTH,HEIGHT)" must be placed into the BODY element in the pop-up window. Just look at the code below:
<body onResize="self.resizeTo(700,150)" bgcolor="#FFFFFF" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">