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

Q240 Is it possible to dynamically alter the size of a window after it has been created?

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

Q240 Is it possible to dynamically alter the size of a window after it has been created?

The following works in Netscape Navigator 4 only:

<SCRIPT LANGUAGE="JavaScript"><!--
if (window.screen && document.layers) {
    window.moveTo(0,0);
    window.outerHeight = screen.availHeight;
    window.outerWidth = screen.availWidth;
}
//--></SCRIPT>

The following works in both Netscape Navigator 4 and Internet Explorer 4:

<SCRIPT LANGUAGE="JavaScript"><!--
window.resizeTo(655,450);
//--></SCRIPT>

They don't however work the same. Netscape Navigator 4 resizes the window so that the document pane is 655x450, whereas Internet Explorer resizes the window to 655x450.

Feedback on 'Q240 Is it possible to dynamically alter the size of a window after it has been created?'


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.