Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q432 Is it possible to disallow a pop-up window to be maximized?

irt.org | Knowledge Base | JavaScript | Window | Q432 [ previous next ]

Q432 Is it possible to disallow a pop-up window to be maximized?

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">

Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.