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

Q1013 Is it possible to determine the width of another frame?

You are here: irt.org | FAQ | JavaScript | Frame | Q1013 [ previous next ]

In Netscape Navigator 4+ you have the window objects innerHeight and innerWidth (or outerHeight and outerWidth) properties.

A frame is a window, therefore:

<SCRIPT LANGUAGE="JavaScript"><!--
if (document.layers) {
    width = parent.frames[1].innerWidth;
    height = parent.frames[1].innerHeight;
    alert('Width = ' + width + ', Height = ' + height);
}
//--></SCRIPT>

©2018 Martin Webb