1 ajax_example.module ajax_example_intro()

A basic introduction page for the ajax_example module.

Related topics

File

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

Code

function ajax_example_intro() {
  $markup = t('The AJAX example module provides many examples of AJAX including forms, links, and AJAX commands.');

  $list[] = l(t('Simplest AJAX Example'), 'examples/ajax_example/simplest');
  $list[] = l(t('Generate checkboxes'), 'examples/ajax_example/autocheckboxes');
  $list[] = l(t('Generate textfields'), 'examples/ajax_example/autotextfields');
  $list[] = l(t('Submit-driven AJAX'), 'examples/ajax_example/submit_driven_ajax');
  $list[] = l(t('Dependent dropdown'), 'examples/ajax_example/dependent_dropdown');
  $list[] = l(t('Dependent dropdown (with graceful degradation)'), 'examples/ajax_example/dependent_dropdown_degrades');
  $list[] = l(t('Dynamic Sections w/JS turned off'), 'examples/ajax_example/dependent_dropdown_degrades_no_js');
  $list[] = l(t('Wizard (with graceful degradation)'), 'examples/ajax_example/wizard');
  $list[] = l(t('Wizard w/JS turned off'), 'examples/ajax_example/wizard_no_js');
  $list[] = l(t('Add-more button (with graceful degradation)'), 'examples/ajax_example/add_more');
  $list[] = l(t('Add-more button w/JS turned off'), 'examples/ajax_example/add_more_no_js');
  $list[] = l(t('Ajax Link ("use-ajax" class)'), 'examples/ajax_example/ajax_link');
  $list[] = l(t('Ajax Link (Renderable Array)'), 'examples/ajax_example/ajax_link_renderable');
  $list[] = l(t('AJAX framework commands'), 'examples/ajax_example/advanced_commands');
  $list[] = l(t('Autocomplete (simple)'), 'examples/ajax_example/simple_autocomplete');
  $list[] = l(t('Autocomplete (node with nid)'), 'examples/ajax_example/node_autocomplete');
  $list[] = l(t('Autocomplete (node limited by author)'), 'examples/ajax_example/node_by_author');

  $variables['items'] = $list;
  $variables['type'] = 'ul';
  $markup .= theme('item_list', $variables);

  return $markup;
}