window.parent

JavaScript1.0+, JScript1.0 Nav2+, IE3+, Opera3+ Syntax

							window.parent.frames[num]
window.parent.frameName
						

Description

The parent property of the Window object contains a reference to the parent window of any frames that are loaded. In the instance where Frame A loads a page with a <frameset> with Frame A.1 and A.2, the parent of the documents in A.1 and A.2 is Frame A. Frame A's parent is the top level window.

The referencing of these sibling frames can either be done using the frames array and passing an index number, or you can directly reference a frame using the name that is assigned by the NAME attribute of the <frame> tag.

Example

Listing 7.569 shows how to reference the parent of the third frame on a page.

Listing ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.