By knalstaaf on
Some developers use a different method each to call scripts for instance.
So there are two ways:
- drupal_add_js("/" . path_to_theme() . '/scripts/myscript.js');
- drupal_add_js($GLOBALS['theme_path'].'/scripts/myscript.js')
We were told the second one ($GLOBALS) is rather unpredictable. Is that right?
What is the best practice to call these kind of scripts anyway?