Click to See Complete Forum and Search --> : xhtml strict doctype and javascript
thejoker101
01-22-2003, 06:50 PM
I recently decided to have my pages be valid with xhtml 1.0 strict. However, I get an error when i run a validator on it with javascript. Any help?
Line 7, column 17: there is no attribute "LANGUAGE".
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
^
Line 7, column 35: there is no attribute "type".
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
^
Line 7, column 52: element "SCRIPT" undefined.
<SCRIPT LANGUAGE="JavaScript" type="text/javascript">
^
spufi
01-22-2003, 07:20 PM
This validates against XHTML 1.1.
<script type="text/javascript">
thejoker101
01-22-2003, 07:24 PM
Hmm, weird, i take out the language="javascript" and lowercase the <SCRIPT and it validates, odd. What about things like onMouseOver and onMouseOut and onClick, i get errors for those too...
Charles
01-22-2003, 07:40 PM
Originally posted by thejoker101
Hmm, weird, i take out the language="javascript" and lowercase the <SCRIPT and it validates, odd. What about things like onMouseOver and onMouseOut and onClick, i get errors for those too... What on earth do you think that validation means? In XHTML all element and attribute names are case sensitive and lowercase. (And the event handlers always were all lower case. It's just that attribute names in HTML are case insensitive.) And try reading the DTD. There is no language attribute for the script element or for any other element.
spufi
01-22-2003, 07:42 PM
Tags in XHTML must be in lower case. For the other stuff, you have to post a link your code, post it, or upload a copy of your file.