concept callback option in category javascript

appears as: callback options, callback option
Prototype and Scriptaculous in Action

This is an excerpt from Manning's book Prototype and Scriptaculous in Action.

Whether or not you apply transitions, you may want to receive notifications during the course of an effect. In the next section, we’ll take a look at the callback options available to us.

Using the callback options

When a save operation is initiated (either by clicking the Save button or pressing the Enter key while the editor’s text field has focus), a JavaScript function is called to generate the query string that will be applied to the server-side post operation. Unless you specify otherwise with the callback option, an internal method that serializes the generated form is called. This method uses the Form.serialize() method from the Prototype library.