1 ajax.inc ajax_command_alert($text)

Creates a Backdrop Ajax 'alert' command.

The 'alert' command instructs the client to display a JavaScript alert dialog box.

This command is implemented by Backdrop.ajax.prototype.commands.alert() defined in misc/ajax.js.


$text: The message string to display to the user.

Return value

An array suitable for use with the ajax_render() function.:

Related topics


core/includes/ajax.inc, line 901
Functions for use with Backdrop's Ajax framework.


function ajax_command_alert($text) {
  return array(
    'command' => 'alert',
    'text' => $text,