What's in This Book
The first four chapters focus on fundamental JavaScript topics. In
Chapter 1, Strings, you will
see the difference between a string value and a string object.
Regular expressions play a big role in string parsing for these
recipes. You will also see a reusable library for reading and writing
string data to cookies. Chapter 2,
Numbers and Dates, includes recipes for handling
number formatting and conversions, as well as date calculations that
get used in later recipes. Perhaps the most important core JavaScript
language chapter is Chapter 3, Arrays
and Objects. Recipes in this chapter provide the keys to
one- and multidimensional array creation, array sorting, object
creation, hash table simulation, and exploration of the prototype
inheritance powers of objects. Chapter 4,
Variables, Functions, and Flow Control, includes
a recipe for improving overall script performance.
Chapter 5 through Chapter 8 provide solutions for problems that apply to
almost all scriptable browsers. In Chapter 5,
Browser Feature Detection, you will learn how to
free yourself of the dreaded "browser
sniffing" habit and use forward-compatible
techniques for determining whether the browser is capable of running
a block of script statements. If multiple windows are your nemesis,
then Chapter 6, Managing Browser
Windows, provides plenty of ideas to handle communication
between windows. A few recipes present suggestions for modal windows
(or facsimiles thereof). Not everyone is a frame lover, but Chapter 7, Managing Multiple
Frames, may be of interest to all, especially if you
don't want your site being
"framed" by another site.
Intelligent forms—one of the driving forces behind the creation
of client-side scripting—are the subject of Chapter 8, Dynamic Forms. Updated
to modern techniques, recipes include form validation (with or
without regular expressions) and some cool but subtle techniques
found on some of the most popular web sites on the Internet.
Interactivity with the user is driven by event processing, and Chapter 9, covers the most common event processing tasks
you'll encounter with DHTML scripting. Events ripple
through most of the remaining chapters' recipes.
That includes many recipes in Chapter 10, where
you'll see how to implement a variety of menuing
designs and pass data from one page to the next. Chapter 11, provides recipes for both basic and advanced
style sheet techniques as they apply to dynamic content, including
how to load a browser- or operating system-specific stylesheet into
the page. Style sheets play a big role in Chapter 12, where recipes abound for image rollovers and
user-controlled font sizes, to name a couple.
Chapter 13, addresses numerous challenges in
keeping positioned elements under tight rein. A positioning library
recipe is used extensively throughout the rest of the book, including
more recipes in this chapter for animating elements, scrolling
content, and creating a draggable element. In Chapter 14, the W3C DOM gets a good workout with recipes
for tasks such as embedding JavaScript and XML data within a
document, transforming data into renderable HTML content, and sorting
HTML tables instantly on the client. Additional dynamic content
recipes come in Chapter 15, where more complex
recipes show you how to use DHTML for a slide show, a visual
count-down timer, and a pop-up calendar date picker, among others.
|