I want to add the below external javascript file to the head of my Drupal 6 site.
<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>
<script type="text/javascript">
stLight.options({
publisher: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
});
</script>
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(&$vars){
drupal_set_html_head('<script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script>');
drupal_set_html_head('<script type="text/javascript">stLight.options({publisher: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}); </script>');
}
Someone should kindly assist me feature the links of the external file in the header of every page of my site.
Thank You.