function tripal_core_ahah_bind_events

1.x tripal_core_ahah.api.inc tripal_core_ahah_bind_events()

This function rebuilds the $settings array needed by the javascript that handles AHAH data returns. This function should be called in an AHAH callback function prior to returning.

See http://tripal.info/documentation/ahah_api for example usage

@returns an associative array with an 'ahah' key.

Related topics

16 calls to tripal_core_ahah_bind_events()

File

tripal_core/api/tripal_core_ahah.api.inc, line 110
The Tripal AJAX/AHAH API

Code

function tripal_core_ahah_bind_events() {

  // Get the JS settings so we can merge them.
  $javascript = drupal_add_js(NULL, NULL, 'header');
  $settings = call_user_func_array('array_merge_recursive', $javascript['setting']);

  return array('ahah' => $settings['ahah']);
}