Closed (fixed)
Project:
Zen
Version:
6.x-1.0
Component:
PHP Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
15 Jul 2009 at 18:48 UTC
Updated:
7 Nov 2009 at 13:00 UTC
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
Comment #1
mbinde commentedSame problem here, and clearing cached data didn't help.
Comment #2
johnalbin:-(
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().