PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

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

In This Article