javascript FRAME Description
frame | Firefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 1 | |||||||||||||||
The frame object reflects the frame element, which can only be generated inside a frameset element. Be sure to distinguish the difference between the frame element object (described here) and the window object that a frame makes possible. Properties and methods of a frame element object tend to reflect the aspects associated with the HTML element and its attributes. The content of the frame is a window (a view in the W3C DOM terminology), which has been scriptable from the beginning, and contains a document. Reference a frame element object via its ID, even if you assign the same identifier to a frame element's id and name attributes. For example, from a script residing in one frame's document, reach the frame element object via: parent.document.getElementById("TOCFrame") |
||||||||||||||||
But to reach the same frame in its capacity as a window (and thus access its scripts and document), the reference from the same script would be either of the following: parent.TOCFrame parent.frames["TOCFrame"] |
||||||||||||||||
If a script is processing a reference to the frame element object, you can jump the fence between the element object and its content via the contentDocument or contentWindow properties described below. |
||||||||||||||||
Be aware that references to frame objects shown in this section may not work properly in the Windows 95 version of Internet Explorer 4. Also, the windowRef placeholder may be filled with parent or top if the reference is in a script contained by a child frame. |
||||||||||||||||
HTML Equivalent | ||||||||||||||||
<frame> |
||||||||||||||||
Object Model Reference | ||||||||||||||||
[windowRef.]document.getElementById("frameID") |
||||||||||||||||
Object-Specific Properties | ||||||||||||||||
|
||||||||||||||||
Object-Specific Methods | ||||||||||||||||
None. |
||||||||||||||||
Object-Specific Event Handler Properties | ||||||||||||||||
None. |
Powered by Linode.