aspxtreme

FRAME Element | FRAME Object

HTML Elements/DHTML Objects


Defines the contents and appearance of a frame.

HTML Syntax

Remarks

The FRAME element is used to create a single, independent region of the Web browser window. A FRAME functions like a window within a window.

The FRAME element can only be used within a FRAMESET element, that acts as the container for the individual FRAMEs.

Each FRAME can display a distinct HTML document. The element's src attribute specifies the initial document the FRAME will contain.

Each FRAME is normally assigned a name to identify and reference the frame. This name may be used as the target of subsequent links.

Authors can also specify the appearance of a FRAME, using the element's rendering attributes.

Members



Styles


Example

The following example divides the main browser window into two FRAMEs.

<frameset rows="15%,*">
   <frame src="contents_of_frame1.html" name="frame1">
   <frame src="contents_of_frame2.html" name="frame2">
</frameset>
Notes on DOM Access

An object that is in another FRAME of the same FRAMESET can be accesed using the following notation:

parent.frames.frameName.frameObjID.property

For example, if a page is in a frame ( frame1 ), the following demonstrates how to reference the innerText property of an object with id=frameObjID in a different frame ( frame2 ) of the same frameset.

parent.frames.frame2.frameObjID.innerText
See Also

FRAMESET, IFRAME, frames, Using Frames and Framesets



Books and more ...

Contents
HTML Elements / DOM Objects
HTML Element Attributes
CSS Attributes
DOM Object Properties
DOM-compliant Events Reference
DOM Methods Reference
DOM Collections Reference
 


Suggested Reading



Previous page Back to top Next page

Check out related books at Amazon

© 2000-2008 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support aspxtreme