In my Zen subtheme .info file, adding

scripts[] = test.js

works; however, adding

scripts[] = http://mysite.com/scripts/header.js

doesn't -- the entry for the remote script is not showing up when I view source. Is there a way to include a remote .js file, or do I need to copy it to my local theme directory? We have a number of websites and want to keep this .js in one place, if possible.

I have cleared cached data to see if that made a difference.

Comments

mbinde’s picture

Same problem here, and clearing cached data didn't help.

johnalbin’s picture

Category: bug » support
Status: Active » Fixed

:-(

Unfortunately, Drupal doesn't allow us to add external javascripts in this way. I think that's been fixed in Drupal 7.

The work-around is to follow the comment on http://api.drupal.org/api/function/drupal_add_js/6 and use drupal_set_html_head().

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.