JavaScript Bible, Gold Edition part 184. 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-322 Part VI Appendixes Example A framesetting document script might be using the ID of a FRAME element to read or adjust one of the element properties and then need to perform some action on the content of the page through its document object. You can get the reference to the d ocument object via a statement such as the following var doc FRAME3 .contentDocument Then your script can for example dive into a form in the document var val Document NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example While you have far easier ways to reach the document object of another frame the following statement takes the long way to get there to retrieve the number of forms in the document of another frame var formCount Using the Document property only truly makes sense when a function is passed a FRAME or IFRAME element object reference as a parameter and the script must among other things more related to those objects access the document contained by those elements. frameBorder NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example The default value for the frameBorder property is yes. You can use this setting to create a toggle script which unfortunately does not change the appearance in IE . The W3C-compatible version looks like the following Appendix F Examples from Parts III and IV CD-323 function toggleFrameScroll framelD var theFrame framelD if yes no else yes height width NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example The following fragment assumes a frameset defined with two frames set up as two columns within the frameset. The statements here live in the framesetting document. They retrieve the current width of the left frame and increase the width of that frame by ten percent. Syntax shown