24.8. Using JavaScript to Interact with Frames

JavaScript gives you a variety of tools for accessing and manipulating frames. The default Window object contains a frames property holding an array of frames (other Window objects) contained by the current window or frame. It also has parent and top properties referring to the directly enclosing frame or window and the top-level window, respectively. All of the properties of Window can be applied to any of these entries; see Section 25.35 (The Window Object) for details on the available properties. We show two examples here: having one frame direct another to display a particular URL and transferring the input focus to a frame when its contents change. Two additional examples were given in Chapter ...

Get Core Web Programming, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.