Chapter 8. Savor the script.aculo.us JavaScript Library


Hacks 6367

Your web-application development efforts can substantially benefit from open source JavaScript libraries, if only because they save you time that would otherwise be spent reinventing the wheel. Chapter 6 used the Ajax tools of the powerful Prototype library. The hacks in this chapter use practical controls such as Mac OS Xstyle login boxes and auto-complete email fields deriving from script.aculo.us, an open source JavaScript library that Thomas Fuchs, a software architect in Vienna, Austria, has made available under an MIT-style license (see http://script.aculo.us). The library includes an impressive variety of special effects such as shakes, fades, and pulsations, as well as custom controls such as draggables, droppables, and auto-completing input fields.

script.aculo.us is built upon Prototype's Ajax objects. Version 1.5 of script.aculo.us, for example, depends on Prototype v1.4. Thus, to use script.aculo.us's collection of widget controls and special effects, you must import prototype.js along with scriptaculous.js. Simply use script tags in your web pages to include these two files; scriptaculous.js itself then loads its associated dependent code files, such as controls.js and effects.js.

script.aculo.us includes dozens of effects and tools. The following hacks will help you get started with this versatile library.




Ajax Hacks
Ajax Hacks: Tips & Tools for Creating Responsive Web Sites
ISBN: 0596101694
EAN: 2147483647
Year: 2006
Pages: 138

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net