background preloader

Prototype

Facebook Twitter

AJAX Timeouts with Prototype. Using prototype.js v1.4.0. Last update: August 18th 2007 Table of Contents What is that?

Using prototype.js v1.4.0

In case you haven't already used it, prototype.js is a JavaScript library initially written by Sam Stephenson. This amazingly well thought and well written piece of standards-compliant code takes a lot of the burden associated with creating rich, highly interactive web pages that characterize the Web 2.0 off your back. When I first started trying to use this library, a few years ago, I noticed that the documentation was definitely not one of its strongest points. Prototype.js Documentation List. 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);