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

Q1184 How do I open a pop-up window so that it will be the same size in for both Internet Explorer and Netscape Navigator ?

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

Q1184 How do I open a pop-up window so that it will be the same size in for both Internet Explorer and Netscape Navigator ?

Either allow for the size taken up by toolbars in Internet Explorer when specifying the width and height to the window:

<script language="JavaScript"><!--
if (nagiator.appName=='Internet Explorer')
    var width=100,height=150;
else
    var width=100,height=100;

window.open('about.blank','windowName','width=' + width + ',height=' + height);
//--></script>

Or from within the the popup window, resize it to the size you require:

<script language="JavaScript"><!--
if (document.all)
    window.resizeTo(100,150);
else if (document.layers)
    window.resizeTo(100,100);
}
//--></script>

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.