Example: AJAX
Same name in other branches
- 3.x modules/ajax_example/ajax_example.module \ajax_example
- 8.x-1.x ajax_example/ajax_example.module \ajax_example
- 4.0.x modules/ajax_example/ajax_example.module \ajax_example
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
-
ajax_example/
ajax_example.module, line 8
Functions
Title Sort descending | File name | Summary |
---|---|---|
ajax_example_autocheckboxes | ajax_example/ |
Form manipulation through AJAX. |
ajax_example_autocheckboxes_callback | ajax_example/ |
Callback for autocheckboxes. |
ajax_example_autotextfields | ajax_example/ |
Show/hide textfields based on AJAX-enabled checkbox clicks. |
ajax_example_autotextfields_callback | ajax_example/ |
Callback for autotextfields. |
ajax_example_dependent_dropdown | ajax_example/ |
AJAX-based dropdown example form. |
ajax_example_dependent_dropdown_callback | ajax_example/ |
Selects just the second dropdown to be returned for re-rendering. |
ajax_example_intro | ajax_example/ |
A basic introduction page for the ajax_example module. |
ajax_example_menu | ajax_example/ |
Implements hook_menu(). |
ajax_example_render_link | ajax_example/ |
Demonstrates a clickable AJAX-enabled link using the 'use-ajax' class. |
ajax_example_simplest | ajax_example/ |
Basic AJAX callback example. |
ajax_example_simplest_callback | ajax_example/ |
Callback for ajax_example_simplest. |
ajax_example_submit_driven_ajax | ajax_example/ |
A very basic form which with an AJAX-enabled submit. |
ajax_example_submit_driven_callback | ajax_example/ |
Callback for submit_driven example. |
ajax_link_response | ajax_example/ |
Callback for link example. |
_ajax_example_get_first_dropdown_options | ajax_example/ |
Helper function to populate the first dropdown. |
_ajax_example_get_second_dropdown_options | ajax_example/ |
Helper function to populate the second dropdown. |
Classes
Title Sort descending | File name | Summary |
---|---|---|
AjaxExampleTestCase | ajax_example/ |
Functional tests for AJAX Example module. |