Eight Weeks of Prototype: Week 7, Other Prototype Functionality
Summary
In this article I have discussed several miscellaneous topics to do with Prototype that have not yet been covered in the series "Eight Weeks of Prototype".
Firstly, I showed you the Prototype's Template class can be used, which is especially useful when using JSON response data.
Next I showed you some techniques for reading form values using Prototype. Sometimes you will want to use the value of an element for an Ajax request without submitting the entire form, in which case this becomes useful. For instance, when a user tries to register you might submit just their username in the background to verify its availability.
Next I covered some of the shortcut utility methods provided by Prototype, such as $H(), $R(), $A() and $w().
Finally, I showed you how JavaScript code should be integrated with your web site or application's HTML code. The primary concept to take from this is that all JavaScript code should be accessed from external files and you should almost never have to include any JavaScript statements inline with your HTML.
In the next and final article of Eight Weeks of Prototype, we will create a mini application to demonstrate the many aspects of Prototype covered in this series. The idea is to show you how different concepts fit together, such as Ajax, classes and events.
Other Options
- Download a PDF version of this article
- View or post comments for this article
- Browse similar articles by tag: JavaScript, Prototype
-
Read related articles:
- Eight Weeks of Prototype: Week 1, Beginning with Prototype
- Eight Weeks of Prototype: Week 2, How Prototype Extends Elements
- Eight Weeks of Prototype: Week 3, Prototype Data Types
- Eight Weeks of Prototype: Week 4, Event Handling in Prototype
- Eight Weeks of Prototype: Week 5, Ajax with Prototype
- Eight Weeks of Prototype: Week 6, Writing JavaScript Classes with Prototype
- Eight Weeks of Prototype: Week 8, A Complete Prototype Example



