Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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 ?

You are here: irt.org | FAQ | JavaScript | Window | Q1184 [ previous next ]

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>

©2018 Martin Webb