These examples show basic AJAX concepts.

General documentation is available at AJAX Framework documentation and at the AJAX Forms handbook page.

The several examples here demonstrate basic AJAX usage.

Parent topics

File

modules/examples/ajax_example/ajax_example.module, line 8
AJAX Examples module file with basic examples.

Functions

Namesort ascending Location Description
_ajax_example_get_second_dropdown_options modules/examples/ajax_example/ajax_example.module Helper function to populate the second dropdown.
_ajax_example_get_first_dropdown_options modules/examples/ajax_example/ajax_example.module Helper function to populate the first dropdown.
ajax_link_response modules/examples/ajax_example/ajax_example_misc.inc Callback for link example.
ajax_example_submit_driven_callback modules/examples/ajax_example/ajax_example.module Callback for submit_driven example.
ajax_example_submit_driven_ajax modules/examples/ajax_example/ajax_example.module A very basic form which with an AJAX-enabled submit.
ajax_example_simplest_callback modules/examples/ajax_example/ajax_example.module Callback for ajax_example_simplest.
ajax_example_simplest modules/examples/ajax_example/ajax_example.module Basic AJAX callback example.
ajax_example_render_link modules/examples/ajax_example/ajax_example_misc.inc Demonstrates a clickable AJAX-enabled link using the 'use-ajax' class.
ajax_example_menu modules/examples/ajax_example/ajax_example.module Implements hook_menu().
ajax_example_intro modules/examples/ajax_example/ajax_example.module A basic introduction page for the ajax_example module.
ajax_example_dependent_dropdown_callback modules/examples/ajax_example/ajax_example.module Selects just the second dropdown to be returned for re-rendering.
ajax_example_dependent_dropdown modules/examples/ajax_example/ajax_example.module AJAX-based dropdown example form.
ajax_example_config_info modules/examples/ajax_example/ajax_example.module Implements hook_config_info().
ajax_example_autotextfields_callback modules/examples/ajax_example/ajax_example.module Callback for autotextfields.
ajax_example_autotextfields modules/examples/ajax_example/ajax_example.module Show/hide textfields based on AJAX-enabled checkbox clicks.
ajax_example_autocheckboxes_callback modules/examples/ajax_example/ajax_example.module Callback for autocheckboxes.
ajax_example_autocheckboxes modules/examples/ajax_example/ajax_example.module Form manipulation through AJAX.

Classes

Namesort ascending Location Description
AjaxExampleTestCase modules/examples/ajax_example/ajax_example.test Functional tests for AJAX Example module.