Passing PHP variables to JS file initiated from theme .info file I know it's perfectly possible to pass PHP variables to JS but what if the JS file is initiated from the theme.info file? Can you access it in template.php or? Please some advice..

Thanks!
You don't access the Javascript file in PHP, rather, you tell Drupal to send values to Javascript variables and then access those from your Javascript files. You would use drupal_add_js.

For example, in template.php add:

drupal_add_js(array('myModule' =&gt; array('key' =&gt; 'value')), 'setting');


Then in your Javascript file, you can access that variable as:

Drupal.settings.myModule.key