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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.