External Javascript in IE

Posted by Ceaser Larry on December 8, 2006

Internet Explorer 6 and 7 does not execute code located in a external javascript file unless you have matching script tags.

<script type="text/javascript" src="external.js" />

Should be

<script type="text/javascript" src="external.js" >

I have no idea why, just thought I should make a note of it before I forget for the 100th time.

Comments Archive

  1. Chris said about 1 month later:

    Wow! This one had me for about an hour.

    Thanks C

  2. Errol said 3 months later:

Thanks for the solution. It took me 5 hours to find what the problem was. All other browsers I tried worked!!

  1. Peter said 10 months later:

    I am sure glad you posted this. Thanks!

  2. Daniel said about 1 year later:

    Thanks for the solution. It was good for me to search of the as soon as I came across the issue. Thanks a ton

  3. buduznat said about 1 year later:

    thanks, I just wasted 4 hrs of my day and now I can curse ie for the umph time for this ridiculous crap. Why doesn’t Visual Studio IDE pick this up? crazy!!!

  4. Chiranjit said about 1 year later:

    Thankxx buddy..for this nice solution…I had been tired to find whts d problem at all… But if u find why this happened for MSIE…plz share with us.. hv a nice day.buddy

  5. Apsik_pl said over 2 years later:

    I resolved this issue in 10 minutes, only because I had removed every line of my html file from the top (doctype), but without this page I could struggle more because I thought that encoding of external JS file is improper (it is utf-8) Thanks!