[Javascript] xhtml and JS

Alan Easton alaneaston666 at hotmail.com
Mon Mar 29 16:24:01 CST 2004


Hello All,

I am trying to build a valid xhtml page, but am having some trouble 
validating my external JS files embedded in my page.

My DOC type is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

And I am referencing my External JS files as such:

<script type="text/javascript" language="javascript" 
src="scripts/newmenu_array.js"></script>
<script type="text/javascript" language="javascript" 
src="scripts/mmenu.js"></script>
<script type="text/javascript" language="javascript" 
src="scripts/js_fade.js"></script>

But my javascript is still not working. I have placed "//<![CDATA[" and 
"//]]>" around the code in my external JS files, but my javascript is still 
not performing the way it should, no errors or anything......it just does 
not like my DOC type definition, when I remove that, all works fine.

Any ideas on how to get around this, as I would like the page to be XHTML1.1 
valid.

Many Thanks as always,

Alan...

_________________________________________________________________
Express yourself with cool new emoticons http://www.msn.co.uk/specials/myemo




More information about the Javascript mailing list