background preloader


Facebook Twitter


Json. WebHome < Main < Reprap. Quick Guide to Prototype. Introduction JavaScript’s increasing popularity throughout the web makes it more important than ever to make sure our client side code is implemented with a nice mix of stability, speed, and reusability.

Quick Guide to Prototype

One of the best ways for accomplishing this is to use a simple library and syntax to use as a foundation for every project. Thankfully, Sam Stephenson created an amazing library of functions that we can rely on called Prototype.js to ease our JavaScript development practices. Painless JavaScript Using Prototype [JavaScript & DHTML Tutorials]

Form.Observer and Form.Element.Observer allow you to watch a form (or, in the latter case, a single form element) and trigger callbacks when the data changes.

Painless JavaScript Using Prototype [JavaScript & DHTML Tutorials]

There are actually two flavours of each observer that check for value changes. The first is a periodic observer, which works like this: new Form.Observer($("myform"), 1, myCallBackFunction); new Form.Element.Observer($("myfield"), 1, myCallBackFunction);