frameset | NN 6 IE 4 DOM 1
The frameset object reflects the frameset element. Be sure to distinguish the difference between the frameset element object (described here) and the window object that a frameset makes possible. Properties and methods of a frameset element object tend to reflect the aspects associated with the HTML element and its attributes. The content of the frameset element is a window (a view in the W3C DOM terminology), which has been scriptable from the beginning, and contains a document (although with no renderable elements beyond the nested frame elements). Reference a frameset element object via its ID. For example, from a script residing in one frame's document, reach the frameset element object via:
But to reach the frameset's window (and thus access its scripts and document), the reference from the same script would be either of the following:
If a script is processing a reference to the frameset element object, you can jump the fence between the element object and its content via the ownerDocument property of the element (described among the shared properties earlier in this chapter).
Be aware that references to frameset 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
    <frameset>
Object Model Reference
    [windowRef.]document.getElementById("framesetID")
Object-Specific Properties
border | borderColor | cols | frameBorder | frameSpacing | rows
Object-Specific Methods
None.
Object-Specific Event Handler Properties
Handler | IE Windows | IE Mac | NN | W3C DOM
onafterprint | 5 | n/a | n/a | n/a
onbeforeprint | 5 | n/a | n/a | n/a
onbeforeunload | 4 | n/a | n/a | n/a
onload | 3 | 3.01 | 2 | 2
onresize | 4 | 4 | 4 | n/a
onunload | 3 | 3.01 | 2 | 2

border | NN n/a IE 4 DOM n/a
| Read/Write
Thickness of the spaces between frames in a frameset in pixels. Only the outermost frameset element of a system of nested framesets responds to the border property setting. Internet Explorer treats the default thicknesses for Windows and Macintosh differently, so be aware that the same value may look different on each operating system platform.
Example
    top.document.getElementById("myFrameset").border = 4;
Value
An integer value. A setting of zero eliminates the border entirely. While the value is supposed to represent the precise pixel thickness of borders in the frameset, this is not entirely true for all operating systems or browsers.
Default
6 (IE Windows); 1 (IE Mac).

borderColor | NN n/a IE 4 DOM n/a
| Read/Write
Color of borders between frames of the frameset. The borderColor property of an individual frame overrides the frameset object's setting.
Example
    parent.document.getElementById("myFrameset").borderColor = "salmon";
Value
A hexadecimal triplet or plain-language color name. A setting of empty is interpreted as "#000000" (black). See Appendix A for acceptable plain-language color names.
Default
Varies with operating system.

cols | NN 6 IE 4 DOM 1
| Read/Write
Defines the sizes or proportions of the column arrangement of frames in a frameset. Column size is defined in one of three ways:
Exercise extreme care when scripting a change to this property. Altering the composition of a frameset on the fly might disrupt scripts that communicate across frames. Reducing the number of columns may destroy documents whose scripts or objects support scripts in other frames or the parent. It is safest to maintain the same number of columns, but use this property to adjust the widths of existing frame columns. Early versions of Netscape 6 may not render changes correctly. Also, if your scripts rely on the frameset's onresize event handler, be sure to test on as many platforms as possible that the event is firing in response to script changes of these properties.
Example
    parent.document.getElementById("framesetter").cols = "40%,60%";
Value
Comma-separated list (as a string) of pixel, percentage, or wildcard (*) values. Internet Explorer 4 for the Macintosh exhibits incorrect behavior with some combinations that include a wildcard value.
Default
100%

frameBorder | NN n/a IE 4 DOM n/a
| Read/Write
Controls whether the frameset displays borders between frames. Adjusting this property does not dynamically change the border visibility in Internet Explorer for Windows.
Example
    parent.document.getElementById("framesetter").frameBorder = "no";
Value
Internet Explorer 4 accepts the string values of 1 (on) and 0 (off) as well as yes and no.
Default
yes

frameSpacing | NN n/a IE 4 DOM n/a
| Read/Write
The amount of spacing in pixels between frames within a frameset. Adjusting this property does not dynamically change the frame spacing in Internet Explorer for Windows.
Example
    parent.document.getElementById("framesetter").frameSpacing = 5;
Value
Integer.
Default
2

rows | NN 6 IE 4 DOM 1
| Read/Write
The sizes or proportions of the row arrangement of frames in a frameset. See the cols property for additional details of selecting values for the rows property.
Example
    document.getElementById("myFrameset").rows = "20%, 300, *";
Value
String of comma-delimited list of pixel or percentage values, or the * wildcard character.
Default
None.