Since I learned that I can make my js and css files within the manager I always do that. I find it a lot easier then editing the file in external editor and uploading them to the box. That feature is great especially if I have minor tweaks.
Recently I noticed that if I include a js file created this way it won’t work.
I made the document, changed type to javascript and published. If I call the file in my header like this (FURL enabled):
<script src="mootools-core-1.2.js" type="text/javascript">
The script will show just fine in the source but will create odd results.
now if I copy the exact same script to the assets/js physical directory and call it like that:
<script src="assets/js/mootools-core-1.2.js" type="text/javascript">
The page source looks the same but my script will behave as it should.
I was puzzled to see this, and I must admit I have some other scripts that are created as modx documents and they are working fine, but some others won’t work.
Am I alone on this one or someone else experienced that too maybe?