Edit: the title was supposed to be "Script NOT being included…"
I have a view where I worked out some jQuery by including it directly in the view with a <script> tag. Everything worked fine. Now I want to move the javascript out into a file. Something seems to be breaking down in the inclusion of the file, however. In the view I have:
However, when I inspect the HEAD in Firebug’s HTML tab, that line is not present, and it’s not listed in the Script tab. The file really does reside at that location, and I’m pretty sure I don’t have any typos in the path. What could be causing this disappearing act?
getPathOfAlias returns a file system PATH, you need a url.
Yii::app()->baseUrl.'/js/yourfile.js';
Also, move your js files out of the components folder, it doesn’t make any sense, either put them in your project root in a JS folder, either create extensions and publish their assets, then use the published assets url to reference the asset files(js or css or images).
Thanks. I have tried it with the file in a js directory off my root and using baseUrl, but it still didn’t work, even with hardcoding the url and testing that I could browse to that url and read the javascript in my browser.