function ctools_add_js

cis7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
cle7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
elmsmedia7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
icor7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
meedjum_blog7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')
mooc7 ctools.module ctools_add_js($file, $module = 'ctools', $dir = 'js')

Include js files as necessary.

This helper function is used by ctools but can also be used in other modules in the same way as explained in the comments of ctools_include.


$file: The base file name to be included.

$module: Optional module containing the include.

$dir: Optional subdirectory containing the include file.

19 calls to ctools_add_js()
ctools_ajax_command_attr in sites/all/modules/ulmus/ctools/includes/
Set a single property to a value, on all matched elements.
ctools_ajax_command_redirect in sites/all/modules/ulmus/ctools/includes/
Force a client-side redirect.
ctools_ajax_command_reload in sites/all/modules/ulmus/ctools/includes/
Force a reload of the current page.
ctools_ajax_command_submit in sites/all/modules/ulmus/ctools/includes/
Submit a form.
ctools_ajax_sample_login_success in sites/all/modules/ulmus/ctools/ctools_ajax_sample/ctools_ajax_sample.module
Post-login processor: should we go to the user account or stay in place?

... See full list


sites/all/modules/ulmus/ctools/ctools.module, line 218
CTools primary module file.


function ctools_add_js($file, $module = 'ctools', $dir = 'js') {
  drupal_add_js(drupal_get_path('module', $module) . "/$dir/$file.js");



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.