Hi all, I tend to develop most of my websites on my local machine, which is running Windows XP Pro and IIS. I'm strugging with a weird problem at the moment, in that neither Firefox or IE appear to be loading an external .js file for a scroller i've 'aquired'. Other external .js files load perfectly. The code works perfectly if I embed it in the HTML document, however I want to keep it in an external file. The code also works if I upload to a remote webserver and test. I've tried disabling my virus scanner (Avast! Antivirus), which has no effect. Does anyone have any experience with this issue?
Yes. A while back I wasted a couple of hours with the same problem. Eventually I kicked myself (very hard!) when I realised that the JS was not in the directory I thought it was. Doh! T
I am assuming that you have checked your relative path to the external file; 123.js is different form /123.js. There is a setting in IIS, in properties of the default website, there is a tab for Home Directory. On this tab, press the button labeled Configuration…, and select the Options tab from the resulting dialogue box. The checkbox labeled Enable parent paths is the one you may need to uncheck.
Thanks for everyone's comments. For the record, I have since resolved this problem by creating a new text file and pasting the code into that, then deleting the old file. I can only conclude that perhaps the character encoding of the file was somehow preventing it's being loaded? I had originally downloaded the .js file in a zip file from a web site. Don't know if this would have had any effect. Cheers, Jamie