Im trying to add the apple quicktime js into my theme so i can embed quicktime videos
heres the code i have put in my template
drupal_add_js( 'sites/default/themes/noelclarke/scripts/quicktime.js');
At the moment the link to the js is hardcoded in, im sure theres a better way to do it
The problem is i keep getting the white screen of death after i submit a page with the quicktime javascipt in
Also get an error message saying - Cannot modify header information - headers already sent
the problem is something to do with common.inc on line 311.
The documentation on adding javascipt to your theme isnt much help
Anyone had a similar problem and know how to fix it
Cheers
Comments
You are missing the first argument to the function
See http://api.drupal.org/api/function/drupal_add_js/5 for more details but I think you want
didn't work
nevets' method didn't work for me. at the moment I'm hard-coding the script tag into my theme, which makes me feel dirty. anyone figured this out?
Where did you add this line:
Where did you add this line: on template.php or at your *.tpl.php file?
You have to add it to your template.php file this way:
drupal_add_js ('the path to you js file', 'core');Try
Try this:
drupal_add_js(drupal_get_path('theme', $GLOBALS['theme_key']) . '/myscript.js', 'module');