On this page
function ajax_command_alert
ajax_command_alert($text)
Creates a Drupal Ajax 'alert' command.
The 'alert' command instructs the client to display a JavaScript alert dialog box.
This command is implemented by Drupal.ajax.prototype.commands.alert() defined in misc/ajax.js.
Parameters
$text: The message string to display to the user.
Return value
An array suitable for use with the ajax_render() function.
Related topics
File
- includes/ajax.inc, line 839
- Functions for use with Drupal's Ajax framework.
Code
function ajax_command_alert($text) {
return array(
'command' => 'alert',
'text' => $text,
);
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!ajax.inc/function/ajax_command_alert/7.x