Provides a set of helpers for calling Prototype JavaScript functions, including functionality to call remote methods using Ajax. This means that you can call actions in your controllers without reloading the page, but still update certain parts of it using injections into the DOM. The common use case is having a form that adds a new element to a list without reloading the page.

To be able to use these helpers, you must include the Prototype JavaScript framework in your pages. See the documentation for ActionView::Helpers::JavaScriptHelper for more information on including the necessary JavaScript.

See link_to_remote for documentation of options common to all Ajax helpers.

See also ActionView::Helpers::ScriptaculousHelper for helpers which work with the Scriptaculous controls and visual effects library.

See <a href="/rails/ActionView/Helpers/PrototypeHelper/JavaScriptGenerator">JavaScriptGenerator</a> for information on updating multiple elements on the page in an Ajax response.


CALLBACKS = Set.new([ :uninitialized, :loading, :loaded, :interactive, :complete, :failure, :success ] + (100..599).to_a)

AJAX_OPTIONS = Set.new([ :before, :after, :condition, :url, :asynchronous, :method, :insertion, :position, :form, :with, :update, :script ]).merge(CALLBACKS)


Show files where this module is defined (2 files)
Register or log in to add new notes.