O'Reilly logo

JavaScript Application Cookbook by Jerry Bradenbaugh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

arrays.js

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required