Name

parent — NN 2 IE 3 DOM n/a

Synopsis

Read-only

Returns a reference to the parent window object whose document defined the frameset in which the current frame is specified. Use parent in building a reference from one child frame to variables or methods in the parent document or to variables, methods, and objects in another child frame. For example, if a script in one child frame must reference the content of a text input form element in the other child frame (named “content”), the reference would be:

parent.content.document.forms[0].entryField.value

For more deeply nested frames, you can access the parent of a parent with syntax such as: parent.parent.frameName.

Example

parent.frames[1].document.forms[0].companyName.value = "MegaCorp"

Value

window object reference.

Default

None.

Get Dynamic HTML: The Definitive Reference 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.