Does anyone know if ASP code is executed when a .js extension file is called from html?
It doesnt seem to, but theres no sodding way of checking. :D
Printable View
Does anyone know if ASP code is executed when a .js extension file is called from html?
It doesnt seem to, but theres no sodding way of checking. :D
Please explain further....
Im calling a .js file from my HTML, but the .JS has asp in it. Now I know IIS5 is suppose to execute ASP code wherever it finds it, but it doesnt appear to be doing it.
Any ideas?
I wasn't aware that "IIS5 is suppose to execute ASP code wherever it finds it"
the .js file is only visible to the browser and is not being interpreted by the server
Could you just use a .asp extension for the javascript file and make sure it's included using "language=javascript type=text/javascript" in the tag?
The server cant see the .js file??? Where does it come from then? I think youll find the web server controls all of the files that get sent out. Also IIS5 parses .html and even .cfm files to execute asp code. So I dont why .js should be any different, as it is is treated in the exact same way as a html file is(Check MIME settings under IIS5)
If you are including the .js file ads a client-side include then it stands to reason that the server won't read it
Why not? What difference does it make? You have to go to the server and request the .js file in the same was as you would a .html or .asp file. Or maybe Im just being REALLY stupid. Are client side includes requested in a different manner?