You are here

Example: AJAX in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 ajax_example/ajax_example.module \ajax_example
  2. 7 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

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

Functions

Namesort descending Location Description
AjaxExampleController::renderLinkRenderableArray modules/ajax_example/src/Controller/AjaxExampleController.php Demonstrates a clickable AJAX-enabled link using the 'use-ajax' class.

Classes

Namesort descending Location Description
AjaxExampleMenuTest modules/ajax_example/tests/src/Functional/AjaxExampleMenuTest.php Verify tool block menu items and operability of all our routes.
Autotextfields modules/ajax_example/src/Form/Autotextfields.php Show textfields based on AJAX-enabled checkbox clicks.
DependentDropdownTest modules/ajax_example/tests/src/Functional/DependentDropdownTest.php Functional test of non-AJAX dependent dropdown example.
DynamicFormSectionsTest modules/ajax_example/tests/src/Functional/DynamicFormSectionsTest.php Functional test of non-AJAX dependent dropdown example.
EntityAutocomplete modules/ajax_example/src/Form/EntityAutocomplete.php A simple autocomplete form which looks up usernames.