360Part IIIDocument Objects Referencehave a document that requires (Net web server)
360Part IIIDocument Objects Referencehave a document that requires considerable scrolling to get through, you may want to main- tain a static set of navigation controls visible at all times. By placing those controls be theylinks or image maps in a separate frame, you have made the controls available for immedi- ate access, regardless of the scrolled condition of the main document. Creating framesThe task of defining frames in a document remains the same whether or not you re usingJavaScript. The simplest framesetting document consists of tags that are devoted to settingup the frameset, as follows:
The preceding HTML document, which the user never sees, defines the frameset for theentire browser window. Each frame must have a URL reference (specified by the srcattribute) for a document to load into that frame. For scripting purposes, assigning a nametoeach frame with the nameattribute greatly simplifies scripting frame content. The frame object modelPerhaps the key to successful frame scripting is understanding that the object model in thebrowser s memory at any given instant is determined by the HTML tags in the currentlyloaded documents. All canned object model graphics in this book, such as Figure 16-1, do notreflect the precise object model for your document or document set. For a single, frameless document, the object model starts with just one windowobject, whichcontains one document, as shown in Figure 16-1. In this simple structure, the windowobjectisthe starting point for all references to any loaded object. Because the window is alwaysthere it must be there for a document to load into a reference to any object in the docu- ment can omit a reference to the current window. In a simple two-framed frameset model (see Figure 16-2), the browser treats the container ofthe initial, framesetting document as the parent window. The only visible evidence that thedocument exists is that the framesetting document s title appears in the browser windowtitlebar. Figure 16-1:The simplest window document relationship. WindowDocument