Linking External Javascript with drupal_set_html_head I want to add the below external javascript file to the head of my Drupal 6 site.

&lt;script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
stLight.options({
    publisher: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
});
&lt;/script&gt;


I want to know if it's OK to do somethng like this, as it's not working at the moment.

function template_preprocess_page(&amp;$vars){
  drupal_set_html_head('&lt;script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"&gt;&lt;/script&gt;');
  drupal_set_html_head('&lt;script type="text/javascript"&gt;stLight.options({publisher: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}); &lt;/script&gt;');
}


Someone should kindly assist me feature the links of the external file in the header of every page of my site.

Thank You.
I think all you need to add is $vars['head']=drupal_get_html_head(); after your code above so that the $head variable passed to your page.tpl.php is updated.  If you are doing anything "interesting" with your header, you may need to change that to a .= instead so that it is added to $head instead of just replacing it.