|
JavaScript Application Cookbook
There is a serious information gap for Webmasters learning
client-side JavaScript skills and trying to solve common
Web-related problems. Knowing the syntax is one thing, being
able to build a useful application is another. And while
there are dozens of "how- to" JavaScript books available,
few literally hand the
Webmaster a set of ready-to-go,
client-side JavaScript applications with thorough
documentation that enable the reader to fully understand and
extend those applications. By providing such a set of
applications, JavaScript Application Cookbook allows
Webmasters to immediately add extra functionality to their
Web sites.
This book targets readers with two different skill sets. The
primary target is JavaScript-knowledgeable Webmasters and
designers who can immediately begin constructing their own
versions of the applications. The secondary target is those
with little or no JavaScript experience. The included
applications are ready for immediate use and require little
customization.
This book explores both the code and the techniques that are
centered around core JavaScript functionality, a
functionality that will not become incompatible or
obsolete. The source file design of most applications and
libraries will help modularize reader Web sites and
facilitate easier site management and coding practices.
Chapters are organized by application. Among the included
applications are:
A client-side search engine that will show coders how to
build their own search engine and get excellent results, all
with a client-side tool
A drag-and-drop greeting application that lets users custom
build and send DHTML email greetings
A GUI image rollover tool that generates cross-browser image
rollover code for all versions of JavaScript
A robust client-side shopping cart application that lets
shoppers browse and shop, while the application keeps a tab
of the shopper's selections and a running bill, including
tax and shipping
An online test application that auto-administers, grades,
and displays answers to online exams or surveys
An additional value to this book is an online resource
(http://www.serve.com/hotsyte/) that discusses the
applications and points to other resources. With its focus
on providing practical real-world solutions for Webmasters,
JavaScript Application Cookbook is destined to become a
staple for every JavaScript developer, regardless of
experience.
Editor's Note
Preface
Introduction
1. The Client-Side Search Engine
Execution Requirements
The Syntax Breakdown
nav.html
Building Your Own JavaScript Database
Potential Extensions
2. The Online Test
Execution Requirements
The Syntax Breakdown
index.html-The Frameset
questions.js-The JavaScript Source File
administer.html
Potential Extensions
3. The Interactive Slideshow
Execution Requirements
The Syntax Breakdown
Application Variables
The Application Functions
Potential Extensions
4. The Multiple Search Engine Interface
Execution Requirements
The Syntax Breakdown
Potential Extension: Adding User Control
5. ImageMachine
Execution Requirements
The Syntax Breakdown
Potential Extension: Adding Attributes to the Template
6. Implementing JavaScript Source Files
arrays.js
cookies.js
dhtml.js
events.js
frames.js
images.js
navbar.js
numbers.js
objects.js
strings.js
Potential Extensions
7. Cookie-Based User Preferences
Execution Requirements
Syntax Breakdown
prefs.html
dive.html
Potential Extensions
8. Shopping Bag: The JavaScript Shopping Cart
Shopping Bag Walk-Through
Execution Requirements
Syntax Breakdown
Step 1: Loading Shopping Bag
Step 2: Displaying Products
Step 3: Showing All the Categories
Step 4: Adding Products to the Shopping Bag
Step 5: Changing the Order/Checking Out
Potential Extensions
9. Ciphers in JavaScript
How Ciphers Work
Execution Requirements
The Syntax Breakdown
Potential Extensions
10. Cyber Greetings: Drag-and-Drop Email
Execution Requirements
Syntax Breakdown
The Server Side
Potential Extensions
11. Context-Sensitive Help
Execution Requirements
Syntax Breakdown
Potential Extensions
Epilogue
A. JavaScript Reference
B. Web Resources
C. Using Perl Scripts
Index
|