Drupal: Load JS file from external source

Sometimes you need to use JavaScript API from another source and drupal_add_js() just doesn't cut it.

Instead, just use drupal_set_html_head().

drupal_set_html_head('<script src="http://another-site.net/blah.js" type="text/javascript"></script>');
 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog