PhpRiot
Download This Article
Download this article or the entire “Eight Weeks of Prototype” series with all listings and files.




More information
Related Books
JavaScript: The Good Parts

JavaScript: The Good Parts

Most programming languages contain good and bad parts, but JavaScript has more than its share of...

ASP.NET AJAX in Action

ASP.NET AJAX in Action

Ajax has revolutionized the way users interact with web pages today. Gone are frustrating page...
Browse Articles
Ajax (4), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (12), JSON (2), MVC (1), MySQL (7), onbeforeunload (1), OOP (1), PHP (28), PhpDoc (1), PostgreSQL (6), Prototype (11), Reflection (1), RFC 1867 (1), Robots (1), Scriptaculous (1), SEO (1), Sessions (1), SimpleXML (1), Smarty (5), SOAP (1), SPL (1), Templates (2), W3C (1), XHTML (1), Zend Framework (1), Zend_Search_Lucene (1)

PhpRiot Newsletter
Your Email Address:

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. 

In This Article


Tagged in ,