JavaScript Bible, Gold Edition part 179. 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-272 Part VI Appendixes Listing 16-13 continued FRAMESET C0LS 30 70 FRAME NAME readout SRC javascript FRAME NAME display SRC javascript FRAMESET HTML To gain an understanding of how the offset values work scroll the window slightly in the horizontal direction and notice that the pageXOffset value increases the same goes for the pageYOffset value as you scroll down. Remember that these values reflect the coordinate in the document that is currently under the top-left corner of the window frame holding the document. You can see an IE4 version of this example in Listing 18-20. A cross-browser version would require very little browser branching. parent NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 Compatibility Example To demonstrate how various window object properties refer to window levels in a multiframe environment use your browser to load the Listing 16-14 document. It in turn sets each of two equal-size frames to the same document Listing 16-15. This document extracts the values of several window properties plus the properties of two different window references. Listing 16-14 Framesetting Document for Listing 16-15 HTML HEAD TITLE The Parent Property Example TITLE SCRIPT LANGUAGE JavaScript Framesetter SCRIPT Appendix F Examples from Parts III and IV CD-273 HEAD FRAMESET C0LS 50 50 onUnload FRAME NAME JustAKid1 SRC FRAME NAME JustAKid2 SRC FRAMESET HTML Listing 16-15 Revealing Various Window-Related Properties HTML HEAD TITLE Window Revealer II TITLE SCRIPT LANGUAGE JavaScript function gatherWindowData var msg msg msg top name BR msg msg parent name BR msg msg P msg msg window name BR msg msg self name BR msg msg return msg SCRIPT HEAD B0DY SCRIPT LANGUAGE JavaScript gatherWindowData SCRIPT B0DY HTML In the .