For standard HTML attribute information about the <FRAMESET>
element, see the <FRAMESET>
topic.
As <FRAMESET>
elements basically replace <BODY>
elements when defining a HTML document, it is unsurprising that the <FRAMESET>
element accepts the same four scripting event handlers as attributes, as the <BODY>
element does. It should be noted that as frames in general have not been included in any W3C HTML specification yet (Netscape have so far not 'released' a suitable DTD fragment to the W3C for inclusion), that none of the following scripting event hanlders are detailed in the Cougar specification for the <FRAMESET>
element.
OnBlur
This event is used to execute script functions when the particular <FRAMESET>
loses the users focus. As with all scripting of the <FRAMESET>
element, this can be useful for tracking the way users navigate through a frame based site. It is currently only supported by Netscape
OnError
This event handler can be used to execute script events if there is either a document loading error, or a navigator error. As such, it can be useful for providing valuable debugging information when developing JavaScripts.
OnFocus
This is the opposite of the OnBlur
event and can be used to execute script functions when the particular <FRAMESET>
obtains the users focus. It is also only currently supported by Netscape
OnLoad
The OnLoad
event handler is used to run script functions when the particular <FRAME>
documents (as specified in the SRC
attribute) of the <FRAMESET>
have been fully loaded into the browser. For instance, it could be used to initialise various plug-in modules, or active content in other frames, so that they do not start until all the documents have been loaded. Currently, it is Netscape specific.
OnUnLoad
The opposite of the above, the OnUnLoad
event handler can be used to execute functions in scripts when particular <FRAMESET>
s are unloaded from the browser window (for example, when the user activates a link that goes to another document, which loads a <FRAMESET>
based document on top of an existing <FRAMESET>
). This scripting event is supported by both Netscape and Internet Explorer.