If it works when you remove your doctype this poses the question of what doctype you are using?
If it is an
XHTML variant it is probably because you have to use special comment tags around your code
- Code: Select all
<script type="text/javascript">
<!-- // --><![CDATA[
// ]]>
</script>
otherwise
XHTML characters within the javascript code isn't treated as javascript, it's taken as the
XHTML literals.