These examples illustrate the use of JavaScript modules to provide a primitive level of abstraction. As such, the source code to the modules themselves will not be viewable. However, you can download the modules to your hard disk and use them in your scripts if you like.
All of the module packages have been compressed and are ready for download. The files have been tarred and zipped for Unix users, and ziped for Windows users. Sorry, but no Bin Hexs are available at this time. However, if anyone wants to send a Mac my way (Travis Simon, c/o APC, Level 8, 54 Park Street, Sydney NSW 2000), I will be glad to include Bin Hexes in the future.
This first example revisits an earlier example provided with the lesson on cookies. However, this time around, the code is greatly simplified due to the use of the cookie module. The module takes care of the cookie handling code, freeing up the developer to concentrate on the logic. Swell, huh?
See the example of view source
Download the cookie module tarball or zip file.
This example illustrates the use of the image module. The image module provides all the code necessary to create mouse-over image swaps.
Note: mouse-overs will only work in JavaScript 1.1-compliant broswers or greater. This code does not check browser version. It probably should, but it doesn't. Sorry.
See the example or view source
Download the image module tarball or zip file