Drupal adding JS

Posted by Andrew on Stack Overflow See other posts from Stack Overflow or by Andrew
Published on 2010-04-01T21:11:30Z Indexed on 2010/04/02 12:43 UTC
Read the original article Hit count: 404

Filed under:
|
|

I know this is not a Drupal forum but this forum is quick at responding so I thought I should give it a shot.
Here's my problem. I'm trying to insert reference to the javascript file in the header by using drupal_add_js function. I placed this line inside template preprocess function of template.php. The result....is not working at all. There is no script link in output as it should be. Can anyone tell me what am I doing wrong?
Drupal Version - 6x

function phptemplate_preprocess_page(&$vars) {
    $url = drupal_get_path("theme","mysite");  
    drupal_add_js($url."/jquery.js");  
    drupal_add_js($url."/drupal.js");  

.....

© Stack Overflow or respective owner

Related posts about drupal6

Related posts about drupal