I am a bit perplexed at why a simple bit of code I have is firing in
HTML but not in the equivalent XHTML. Here is the HTML file (that
works as expected):

<html>
<head>
<title>Text Demo</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<link rel="stylesheet" type="text/css" href="stylesheets/default.css">
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<!-- <script type="text/javascript" src="js/jRewriter.js"
charset="UTF-8"/> -->
<script type="text/javascript">
$(function() {
  alert("hi");
});
</script>
</head>
<body>
</body>
</html>

And here is the XHTML file (that does not work as expected):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<head>
<title>Text Demo</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="stylesheets/default.css" /
>
<script type="text/javascript" src="js/jquery-1.3.2.min.js" />
<script type="text/javascript">
//<![CDATA[
$(function() {
  alert("hi");
});
//]]>
</script>
</head>
<body>
</body>
</html>

Is there something I am missing here?

Thanks.
Dean

Reply via email to