Tuesday 28 August 2012

• Internet Explorer bug
– Scripts with src fail to load if you use <script.../>.
• You must use <script src="..." ...></script>
• XHTML: Scripts with body content
– It is an error if the body of the script contains special
XML h t h & <
characters such as or – E.g. <script...>if (a<b) { this(); } else { that(); }</script>
So use CDATA section unless body content is simple
– So, and clearly has no special characters
• <script type="text/javascript"><![CDATA[
JavaScript Code
]]></script>