JavaScript Bible, Gold Edition part 15. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | CD-70 Part II JavaScript Tutorial The window reference is optional when the script is accessing the document object that contains the script. If you want a preview of the document object properties of the browser you re using enter document into the bottom text box of The Evaluator Jr. and press Enter Return. The object s properties and current values appear in the Results box. property One of the object types contained by a document is the FORM element object. Because conceivably there can be more than one form in a document forms are stored as arrays in the property. As you recall from the discussion of arrays in Chapter 7 an index number inside the square brackets points to one of the elements in the array. To find out how many FORM objects are in the current document use To access the first form in a document for example the reference is 0 In general however I recommend that you access a form by way of a name you assign to the form in its NAME attribute as in Either methodology reaches the same object. When a script needs to reference elements inside a form the complete address to that object must include document and form references. property Not every property of a document object is set in a BODY tag attribute. If you assign a title to the page in the TITLE tag set within the Head portion that title text is reflected by the property. A document s title is mostly a cosmetic setting that gives a plain-language name of the page appearing in the browser s title bar as well as the user s history listing and bookmark of your page. method The method operates in both immediate scripts to create content in a page as it loads and in deferred scripts that create new content in the same or different window. The method requires one string parameter which is the HTML content to write to the window or frame. Such string parameters