The FRAMESET tag contains a set of FRAME tags, which each define a frame in the main window.
Each frame has a distinct URL that determines the content displayed by the frame.
<FRAME
BORDERCOLOR="
color
"
FRAMEBORDER="YES"|"NO"
MARGINHEIGHT="
marginHeight
"
MARGINWIDTH="
marginWidth
"
NAME="
frameName
"
NORESIZE
SCROLLING="YES"|"NO"|"AUTO"
SRC="URL"
>
specifies the color of the frame's borders. See Color Units for information about color values. Navigator 3.0.Because frames share borders, Navigator must resolve any border color conflicts. See the section "FRAMESET" for details of the conflict resolution.
determines whether or not the frame has visible borders. Navigator 3.0.
When the FRAMEBORDER attribute appears in a FRAMESET tag, it sets a default FRAMEBORDER value for all frames in the frameset. When the FRAMEBORDER attribute appears in the FRAME tag, it applies only to that particular frame, overriding any FRAMEBORDER attribute established by an outer FRAMESET tag. A border shared between frames is plain only if all adjacent frames have the FRAMEBORDER attribute set to NO.
- YES results in an outline-3D border.
- NO suppresses the 3D border.
specifies a margin, in pixels, between the top and bottom edges of the frame and the frame contents.
specifies a margin, in pixels, between the left and right edges of the frame and the frame contents.
specifies the name of the frame. The value of the NAME attribute must begin with an alphanumeric character.
specifies that users cannot resize the frame. If a frame adjacent to an edge is not resizable, the entire edge is not resizable, and consequently other frames adjacent to that edge are not resizable.
specifies whether scrollbars are available on a frame:
- YES specifies that scrollbars are always available.
- NO specifies that scrollbars are never available.
- AUTO specifies that the browser determines whether to display scroll bars based on the size of the frame and its content. If you do not specify a value for SCROLLING, the default value is AUTO.
specifies the URL for the document to be displayed in the frame. The URL cannot include an anchor name; for exampleFRAME SRC="doc2.html#colors"
is invalid. If you do not specify the SRC attribute, the frame is displayed with no content.
The only place the FRAMESET tag can be used is in a frame definition document, which is an HTML document that contains the FRAMESET and FRAME tags that describe the framesets and frames that make up a Navigator window. An HTML document that contains a FRAMESET tag cannot contain a BODY tag.
For example, the file frameset.htm opens a web page that has three frames. If you click a link in the left frame, both the other frames update. You can open the file frametoc.htm and view its source to see the code for the links that update multiple frames.
<FRAMESET
COLS="
columnWidthList
"
ROWS="
rowHeightList
"
BORDER="
pixWidth
"
BORDERCOLOR="
color
"
FRAMEBORDER="YES"|"NO"
ONBLUR="
J
Scode
"
ONFOCUS="
JScode
"
ONLOAD="
JScode
"
ONUNLOAD="
JScode
"
>
...
</FRAMESET>
You must supply at least one of the COLS or ROWS attribues.
specifies a comma-separated list of values giving the width of each frame in the frameset. If one of the values is missing, the browser sizes the corresponding frame to fit the space available. The browser may approximate some values to make the total width of the columns equal to the width of the window. The value of each item in the columnWidthList can be one of the following:
- Width of a frame in pixels.
- Width of a frame as a percentage of its parent frame or window.
- An asterisk (*), which means "as much space as possible," which is the space left over after space has been allocated to all columns that specify their width as pixel value or a percentage value . The total available left-over space is divided equally between all columns that use an asterisk.
specifies a comma-separated list of values giving the height of each frame in the frameset. If one of the values is missing, the corresponding frame is sized to fit the space available. The browser may approximate some values to make the total height of the rows equal to the height of the window. Each item in rowHeightList can be one of the following:
- Height of a frame in pixels.
- Height of a frame as a percentage of the parent frame or window.
- An asterisk (*) which means "as much space as possible," which is the space left over after space has been allocated to all rows that specify their height as pixel value or a percentage value . The total available left-over space is divided equally between all rows that use an asterisk.
specifies the thickness of frame borders for all frames in an outermost frameset. A setting of 0 causes all frames in the frameset to have no border between them. A setting of 3 causes a border of 3 pixels. If no BORDER tag is present, the default is 5 pixels. The BORDER tag can be used only on an outermost FRAMESET tag. Navigator 3.0
specifies the color of a frame's borders. See Color Units for information about color values. Navigator 3.0Because frame borders are shared, Navigator must resolve any border color conflicts.
If there is a conflict for two colors of equal priority both set on the same edge, the behavior is undefined.
- Any BORDERCOLOR attribute appearing in the outermost FRAMESET has the lowest priority.
- This attribute is overridden by any attribute used in a nested FRAMESET tag.
- Finally, any BORDERCOLOR attribute in the current FRAME tag overrides all previous FRAMESET tag settings.
determines how frame borders are displayed. Navigator 3.0
When the FRAMEBORDER attribute appears in the FRAMESET tag, it sets a default FRAMEBORDER value for all frames in that frameset. When the FRAMEBORDER attribute appears in a FRAME tag, it applies only to that particular frame, overriding any FRAMEBORDER attribute specified by an outer FRAMESET tag. A border shared between frames is plain only if all adjacent frames have the FRAMEBORDER attribute set to NO. When neither a FRAME nor a FRAMESET tag governing that FRAME has set the FRAMEBORDER attribute, the default setting is YES.
- YES results in an outline-3D border.
- NO suppresses the 3D border.
specifies JavaScript code to execute when the window containing the frameset loses focus. For information about JavaScript, see the JavaScript Guide or the JavaScript Reference. Navigator 3.0
specifies JavaScript code to execute when the window containing the frameset gets focus. Navigator 3.0
specifies JavaScript code to execute when the frameset is loaded into the frame.
specifies JavaScript code to execute when the frameset is unloaded (exited).
<HTML>
<HEAD> <TITLE>Simple Frame Set Example</TITLE></HEAD>
<FRAMESET COLS="20%,80%" BORDER=10>
<FRAME SRC="simpltoc.htm" NAME="exampletoc">
<FRAME SRC="forms.htm" NAME="examplecontent">
<NOFRAMES>You must use a browser that can display frames
to see this page. </NOFRAMES>
</FRAMESET>
</HTML>
The two frames appear as columns because COLS is specified within the FRAMESET tag. The left frame uses 30% of the available space, and the right frame uses the remaining 70% of the space. By default, the frames in this example have scrollbars and are resizable, because no values are specified for the SCROLLING and NORESIZE attributes.The file simplset.htm shows this example in action in a separate window. The content of the left hand frame is provided by the file simpltoc.htm. View its source to see the HTML that in the left hand frame.
<HTML><HEAD><TITLE>Frame Set Example</TITLE></HEAD>
<FRAMESET COLS="20%,*">
<NOFRAME>You must use a browser that can display frames
to see this page.</NOFRAME>
<FRAME SRC="frametoc.htm" NAME="noname">
<FRAMESET ROWS="30%,*">
<FRAME SRC="frtoc1.htm" NAME="toptoc">
<FRAME SRC="frstart.htm" NAME="outer">
</FRAMESET>
</FRAMESET>
</HTML>
The file frameset.htm contains this frameset. The left hand column shows a set of links. Clicking one of the links causes both frames in the right column to change their content. To see the source code that enables a link to update multiple frames in one go, open the page frametoc.htm and view its source.Place the NOFRAMES tag within the FRAMESET tag.
<NOFRAMES>...</NOFRAMES>
<FRAMESET>
Last Updated: 01/26/98 21:33:44