function ajax_command_replace

×

Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
cis7 ajax.inc ajax_command_replace($selector, $html, $settings = NULL)
cle7 ajax.inc ajax_command_replace($selector, $html, $settings = NULL)
elmsmedia7 ajax.inc ajax_command_replace($selector, $html, $settings = NULL)
icor7 ajax.inc ajax_command_replace($selector, $html, $settings = NULL)
meedjum_blog7 ajax.inc ajax_command_replace($selector, $html, $settings = NULL)
mooc7 ajax.inc ajax_command_replace($selector, $html, $settings = NULL)

Creates a Drupal Ajax 'insert/replaceWith' command.

The 'insert/replaceWith' command instructs the client to use jQuery's replaceWith() method to replace each element matched matched by the given selector with the given HTML.

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

jQuery replaceWith command

Parameters

$selector: A jQuery selector string. If the command is a response to a request from an #ajax form element then this value can be NULL.

$html: The data to use with the jQuery replaceWith() method.

$settings: An optional array of settings that will be used for this command only.

Return value

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

See

Related topics

16 calls to ajax_command_replace()
boxes_footer in sites/all/modules/ulmus/boxes/boxes.module
Implements hook_footer().
ctools_access_ajax_add in sites/all/modules/ulmus/ctools/includes/context-access-admin.inc
AJAX callback to add a new access test to the list.
ctools_access_ajax_delete in sites/all/modules/ulmus/ctools/includes/context-access-admin.inc
AJAX command to remove an access control item.
ctools_access_ajax_edit in sites/all/modules/ulmus/ctools/includes/context-access-admin.inc
AJAX callback to edit an access test in the list.
ctools_context_ajax_item_add in sites/all/modules/ulmus/ctools/includes/context-admin.inc
Ajax entry point to add an context

... See full list

File

includes/ajax.inc, line 866
Functions for use with Drupal's Ajax framework.

Code

function ajax_command_replace($selector, $html, $settings = NULL) {
  return array(
    'command' => 'insert',
    'method' => 'replaceWith',
    'selector' => $selector,
    'data' => $html,
    'settings' => $settings,
  );
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.