Script tag and attributes

I’ve lost precious time wondering why a Javascript code is working properly in FireFox, while on IE it’s not working at all. First thought was that the script is incompatible, but the final result was pretty stupid.

The reason:
The script tag was written this way:

<script type="application/x-javascript">
....
</script>

changing the type attribute to “text/javascript” do the magic:

<script type="text/javascript">
....
</script>

The first code is created from autocomplete snipped in Komodo Editor. So, use “text/javascript” type attribute in order to reduce headaches 🙂

4 thoughts on “Script tag and attributes

  1. Steven Lambert

    I have almost always used text/javascript and hence never faced this issue. I believe Komodo Editor should fix this bug pronto.

    @Radoslav: True, the captcha is hard to read 😉 I prefer the math captchas more.

  2. Nik Chankov Post author

    Thanks for your replays. In fact I fixed the auto complete code, so from now on I shoud not face such problem.

    About captcha – it’s an plugin, I cant change it much 🙁

  3. Jake

    I’ve been using Wynsyntax forever. Hadn’t heard about of Komodo Editor before. Guess I need to crawl out from under my rock more often.

Leave a Reply

Your email address will not be published. Required fields are marked *