Chapter 6. Implementing JavaScript Source Files

Library Functions
• Array Manipulation
• Cookie Management
• DHTML Operations
• Mouse and Keyboard Capture
• Frameset Relationships
• Navigation Bar Creation
• Number Formatting and Correction
• Object Creation and Inspection
• String Manipulation

If you’ve been following along since the beginning (in order) you’ve been poring through code trying to understand how the functions and variables work together so that those applications actually do something. I thought it might be a nice break to look at something that could make life easier for all your applications.

This chapter doesn’t contain any applications. Rather, it documents several dozen functions contained in JavaScript source files. Though you may not find all of them useful, there are probably a handful that you can use right away and many others that you can customize to make useful.

I didn’t include these files to imply that I could hand you a bunch of functions and say, “OK, coders, this is all you’ll ever need.” That’s ludicrous. This chapter is designed to encourage you to beef up your own JavaScript library with reusable code. Then you won’t have to re-invent the wheel every time you code a new application. The following list shows the .js files, in alphabetical order, and the purpose of each.


Contains array manipulation functions. Some of the functions allow you to perform the equivalent JavaScript ...

Get JavaScript Application Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.