You are here

function ctools_ajax_command_replace in Chaos Tool Suite (ctools) 6

Create a replace command for the AJAX responder.

The replace command will replace a portion of the current document with the specified HTML.

Parameters

$selector: The CSS selector. This can be any selector jquery uses in $().

$html: The data to use with the jquery replace() function.

10 calls to ctools_ajax_command_replace()
ctools_access_ajax_add in includes/context-access-admin.inc
AJAX callback to add a new access test to the list.
ctools_access_ajax_delete in includes/context-access-admin.inc
AJAX command to remove an access control item.
ctools_access_ajax_edit in includes/context-access-admin.inc
AJAX callback to edit an access test in the list.
ctools_context_ajax_item_add in includes/context-admin.inc
Ajax entry point to add an context
ctools_context_ajax_item_delete in includes/context-admin.inc
Ajax entry point to edit an item

... See full list

File

includes/ajax.inc, line 155
Utilize the CTools AJAX responder.

Code

function ctools_ajax_command_replace($selector, $html) {
  return array(
    'command' => 'replace',
    'selector' => $selector,
    'data' => $html,
  );
}