Most JavaScript books force you to slog through reams of reference material before you get to the good stuff. This book is not one of them. Nick Heinle, former WebReference expert and WebCoder wunderkind, and Bill Pena have updated Heinle's first edition into O'Reilly's patented Web Studio style intro to JavaScript.
Aimed at beginning to intermediate scripters, DWJ2 skips the dry stuff and dives right into practical real-world examples of useful scripts you can easily add to your own pages. Everything from simple descriptive links and remotes, to frames, form validation and arrays, through sniffing, rollovers, personalization through cookies, and more advanced topics are covered.
A brief DHTML chapter follows, with some simplified examples of drop-down menus (non-hierarchical), sliding tabs, and scrolling layers with clipping, useful for news feeds.
The advanced chapter covers object-oriented scripting and shows how to create a quiz to test your readers. Relational select menus (2-level) illustrate using two-dimensional arrays nicely.
I especially enjoyed the section on cross-browser style objects, where the authors demonstrate the use of Netscape's xbStyle object. xbStyle is a simple abstraction layer that removes the complexity of accessing style properties. Using xbStyle you can grab, hide, and move layers without worrying about implementation details of specific browsers.
The coolest thing about xbStyle is the layer grabbing technique. xbStyle implements a W3C-like document.getElementById() method for 4.0 browsers! For these older browsers, xbStyle redefines this method, to make its use seamless for scripters manipulating layers (DIVs). This example demonstrates the leveraging power of a well-executed API. This book is a good intro by example to JavaScript.