I have a javascript function I'd like to include on every page so that I can use it in content without having to include it on every single page every time I submit something..

With vBulletin, they have a vbulletin_global.js that every single page calls for various functions.. if not drupal.js, is there something similar?

Thanks!

Comments

motivez’s picture

Anyone know?

pwolanin’s picture

In 4.7.x, JavaScript files are added to the page header by calling drupal_set_html_head().

http://api.drupal.org/api/4.7/function/drupal_set_html_head

Try looking at some themes/modules- probably the js function could also go directly in your page.tpl.php.

---
Work: BioRAFT