You are here

22 February 2011
This Drupal API tutorial shows you how you can include external javascript files.
If you want to add external javascript libraries through drupal api then this is the way to do this.
Source code viewer
  1. <?php
  2. drupal_set_html_head('<script src="http://example.com/javascript.js" type="text/javascript"></script>');
  3. //now you might have to reload the header instance
  4. $variables['head'] = drupal_get_html_head();
  5. ?>
Programming Language: PHP