title: Adding a JavaScript file
body: <p>I'm trying to insert reference to the Javascript file in the header by using <code>drupal_add_js()</code>. I placed this line inside the template preprocess function in template.php. The result that the code 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?  </p>
  
  <pre><code>function phptemplate_preprocess_page(&amp;$vars) {
      $url = drupal_get_path("theme","mysite");  
      drupal_add_js($url."/jquery.js");  
      drupal_add_js($url."/drupal.js");  
  
  .....
  </code></pre>