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

Q654 How can you specify the size of a window with window.open() so that both Netscape Navigator & Internet Explorer open a window with the same size document area?

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

Work out the size difference, and then use JavaScript code similar to:

<SCRIPT LANGUAGE="JavaScript"><!--
function myOpen(page,width,height) {
    if (navigator.appName == 'Netscape') {
        adjWidth = width + 20;
        adjHeight = height + 20;
    }
    else {
        adjWidth = width + 50;
        adjHeight = height + 150;
    }

    window.open(page,'windowName','width=' + adjWidth + ',height=' + adjHeight + ',toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes');
}

myOpen('irt.gif',170,66);
//--></SCRIPT>

©2018 Martin Webb