JavaScript Examples Bible: The Essential Companion to JavaScript Bible

Acommon thread running throughout most of my computer-book–writing career is that I tend to write a book I wish I had had in order to learn a new technology in the first place. Because I must write that book without the benefit of existing models, I begin by doing my best to master the technology, and then I write the book to help other newcomers learn as much as I did, but more quickly and with less pain, anguish, and confusion. To accomplish that goal, I write as much content as I feel is necessary to cover the topic in the depth that my readers require.
When I started on what became the 4th and Gold editions of the JavaScript Bible, there were models to follow (my previous three editions) plus a substantial amount of brand new material, much of which had not yet been documented anywhere. I also assumed the responsibility of integrating the frequently conflicting and com- peting philosophies of the ways the JavaScript language is applied to a variety of browser brands and versions. Resolving these conflicts is a challenge that I face in
my own programming work with clients, and I take great pleasure in sharing my solutions and approaches with other programmers floating in the same boat.
As my editor and I began counting the pages I had assembled for these new edi- tions, we discovered that the number of pages far outstripped the printer’s binding
capabilities, even in a thicker volume made possible by using a hard cover (the Gold edition). Certainly not all of the words that I had written were so precious that
some of them couldn’t be cut. But we were hundreds of pages beyond capacity. To cut that much content would have forced exclusion of coverage of language or doc-
ument object model vocabulary.
Fortunately, as had been done in previous editions, the plan for the new editions included Adobe Acrobat versions of the books on the accompanying CD-ROM. Although a significant compromise to ease of reading, it was possible to move some of the book’s content to the CD-ROM and leave the most important parts on the printed page. For the softcover 4th edition, reference chapters covering less-used or advanced subjects were pulled from print; for the hardcover Gold edition, which was longer and targeted more for professional scripters, the advanced chapters
were put back into the book (along with 15 additional chapters for that edition), and the JavaScript tutorial was exiled to the CD-ROM.
But even after making the difficult decisions about which chapters could go to the
CD-ROMs, the page counts for both volumes were still excessive. Something else—something big—had to go. The remaining bundle that could free us from the pagex JavaScript Example Bible: The Essential Companion to JavaScript Bible count devil was all of the Example sections from the reference vocabulary. By being nondiscriminatory about these extractions—that is, extracting all of them instead of only selected sections—we could convey to readers a consistent organizational model.
In the end, the extracted Example sections from Parts III and IV found their way into Appendix F on the CD-ROMs of both editions of the larger tome. I knew that as a
reader of my own books (and one of a certain age at that) I would not enjoy having to flip back and forth between book and screen to refresh my memory about a term
and see it in action. A more pleasing solution for many JavaScript Bible readers would be a separate volume containing a printed version of the Examples sections.
The new volume would act as a companion to both the 4th and Gold editions of the JavaScript Bible. Using Appendix F as a starting point, I divided the content into chapters along the same lines as the JavaScript Bible reference sections. This also gave me a chance to study the examples for each chapter with fresh eyes. The examples haven’t changed, but I had the opportunity to direct the reader’s attention to examples that I thought were particularly helpful in mastering a document-level or core language