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

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

irt.org | Knowledge Base | JavaScript | Frame | Q1013 [ previous next ]

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

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>

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.