View Single Post
Old 09-25-2007, 07:20 AM   #6 (permalink)
Salathe
Moderateur
RegEx Guru PHP Guru Top Contributor Advanced Programmer 
 
Salathe's Avatar
 
Join Date: Apr 2007
Posts: 1,393
Thanks: 5
Salathe is on a distinguished road
Default

If you're wanting to keep the code within the HTML document, you'll need to tell the validator not to check the script by making it a CDATA block (that's XML terminology). The two "commented" (//) lines are what's important here.

HTML Code:
<script type="text/javascript">
//<![CDATA[

alert("This is compatible with XHTML");

//]]>
</script>
Salathe is offline  
Reply With Quote