Reputation: 15583
i have some javascript
files included in my html file for months. It used to work just fine until couple of days ago, now my scripts don't run anymore and i get javascript error "invalid XML attribute value <script language=JavaScript>\n"
with firebug.
Does anyone know what this error means and how to get rid of it? i guess is something about that newline
"\n" but i can't see that in my file if i open it.
Upvotes: 1
Views: 5100
Reputation: 630339
The error is because of missing quotes on language=JavaScript
, but as the other answers say, it's best to replace it with type="text/javascript"
(including the quotes!)
Make sure to always put your attributes in quotes, in this case you would have gotten another validation error even after doing so, but in itself is still a validation error, more importantly, it's a validation error with very real side-effects in many cases.
Upvotes: 0
Reputation: 523154
Try to find that <script language=JavaScript>
and replace with
<script language="JavaScript">
or
<script type="text/javascript">
Upvotes: 1
Reputation: 449385
IIRC, language
was never part of any specification, at least not in XHTML (And I think not in HTML, either.)
Try whether <script type="text/javascript">
works better.
Upvotes: 3