function ctools_ajax_sample_hello
Returns a "take it all over" hello world style request.
1 string reference to 'ctools_ajax_sample_hello'
- ctools_ajax_sample_menu in ctools_ajax_sample/
ctools_ajax_sample.module - Implementation of hook_menu()
File
-
ctools_ajax_sample/
ctools_ajax_sample.module, line 222
Code
function ctools_ajax_sample_hello($js = NULL) {
$output = '<h1>' . t('Hello World') . '</h1>';
if ($js) {
ctools_include('ajax');
$commands = array();
$commands[] = ajax_command_html('#ctools-sample', $output);
// This function exits.
print ajax_render($commands);
exit;
}
else {
return $output;
}
}