Приглашаем посетить
Window and Frame Management
Chapter 5
Window and Frame Management
This chapter shows you how to create, manage, and navigate between multiple
windows, modal dialog boxes, and framesets. With Dynamic HTML, your scripts
can move, resize, and scroll windows. Your code can open HTML documents in
their own windows in several different ways and manipulate the multiple browser
instances created. It can also partition the window into multiple regions called
frames and manipulate each frame as an independent window.
The following topics are covered in this chapter:
- Manipulating the window Chapter 4, "The Browser Window,"
introduced events that fire when the user interacts with the window.
This section discusses the methods provided by the
window object for moving, resizing, and scrolling the document.
- Creating new windows This section discusses how to write code
to manipulate multiple windows. The window object can be used to
create new instances of the browser window, thus creating new
window objects. In addition, the window object exposes methods that let you display a variety of dialog boxes and HTML-based help windows.
These dialog boxes are useful for providing notifications to the user,
requesting simple strings, and asking yes/no questions. You can also
create custom modal dialog boxes and help files whose contents are located
in other HTML documents.
- Manipulating framesets This section presents the HTML code
for creating a frameset and introduces the frames collection, which provides access to the individual frames. Each frame is an instance of the
window object, so the object model for windows is also applicable to
each frame. All the techniques available for manipulating windows can
also be used for manipulating frames.
- Special event considerations This section introduces techniques
for cross-frame and cross-window event handling and demonstrates how
to write an event handler in one window that handles events in
another window.
[Содержание]