Prototype.js
December 3rd, 2005
Particletree has a guide to using Prototype - a fantastic Javascript framework. Prototype can make your Javascript a lot tidier and it packs a lot of punch for 29KB. Prototype provides functions making it easier to work with forms and a serialize function which encodes your form information in the form var1=blah&var2=bleh. If you use XmlHttpRequest you will find the form serialize useful. Prototype also adds a document.getElementsByClassName function which can be really useful in writing unobtrusive Javascript.
The article also covers the $() function, element helpers, Try.These(), Ajax and PeriodicalExecuter which I’m sure anyone who writes Javascript will love. There is also some unofficial prototype documentation which documents objects, classes, functions and extensions.
IANAL but Prototype is released under the MIT License so you’re free to use it in a commercial program, sell it or incorporate it into a GPL program.
- Uncategorized
- Comments(0)