219Chapter 16 .Window and Frame Objects For a (Cool web site)

219Chapter 16 .Window and Frame Objects For a single, frameless document, the object model starts with just one window object, which contains one document, as shown in Figure 16-1. In this simple structure, the window object is the starting point for all references to any loaded object. Because the window is always there it must be there for a document to load into a reference to any object in the document can omit a reference to the current window. In a simple two-framed frameset model (Figure 16-2), the browser treats the container of the initial, framesetting document as the parent window. The only visible evidence that the document exists is that the framesetting document s title appears in the browser window title bar. Top Parent Top Parent Document Document Top Parent Figure 16-2: The parent and frames are part of the object model. Each tag inside the tag set creates another window object into which a document is loaded. Each of those frames, then, has a document object associated with it. From the point of view of a given document, it has a single window container, just as in the model shown in Figure 16-1. And although the parent object is not visible to the user, it remains in the object model in memory. The presence of the parent often makes it a convenient repository for variable data that need to be shared by multiple child frames or must persist between loading of different documents inside a child frame. In even more complex arrangements, as shown in Figure 16-3, a child frame itself may load a framesetting document. In this situation, the differentiation between the parent and topobjects starts to come into focus. The top window is the only one in common with all frames in Figure 16-3. As you see in a moment, when frames need to communicate with other frames (and their documents), you must fashion references to the distant object via the window object that they all have in common.
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply