M
meyazoo
I have tried to resolve this in several ways that I have found on the
internet, but none seems to work. Here is the shortened code which is
a website displaying a webcam. The .jpg is overwritten with new image
from the camera. This code works, but does not pass W3C XHTML
STRICT.
1) How can I keep this working, and change the attribute to "id" so is
passes STRICT?
2) While I'm asking questions, what purpose does the "//" in the //<!
[CDATA[ line perform? When I read the spec (http://www.w3.org/TR/
xhtml1/) it only says to use <![CDATA[ ?
MY CODE ***************************************
***************************************************
<!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" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Camsite</title>
<script type="text/javascript">
//<![CDATA[
function refreshIMG()
{
var trimmedPath=new Array();
var currentPath=document.image3.src;
trimmedPath=currentPath.split("?");
document.image3.src = trimmedPath[0] + "?" +
Math.random();
setTimeout("refreshIMG()", 8*1000);
}
//]]>
</script>
</head>
<body onload="refreshIMG()">
<h4>CAM_3</h4>
<div>
<img class="cam" src="images/cam_3.jpg" width="320"
height="240" name="image3" alt="Image loading ..." id="image3" />
</div>
</body>
</html>
internet, but none seems to work. Here is the shortened code which is
a website displaying a webcam. The .jpg is overwritten with new image
from the camera. This code works, but does not pass W3C XHTML
STRICT.
1) How can I keep this working, and change the attribute to "id" so is
passes STRICT?
2) While I'm asking questions, what purpose does the "//" in the //<!
[CDATA[ line perform? When I read the spec (http://www.w3.org/TR/
xhtml1/) it only says to use <![CDATA[ ?
MY CODE ***************************************
***************************************************
<!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" lang="en" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Camsite</title>
<script type="text/javascript">
//<![CDATA[
function refreshIMG()
{
var trimmedPath=new Array();
var currentPath=document.image3.src;
trimmedPath=currentPath.split("?");
document.image3.src = trimmedPath[0] + "?" +
Math.random();
setTimeout("refreshIMG()", 8*1000);
}
//]]>
</script>
</head>
<body onload="refreshIMG()">
<h4>CAM_3</h4>
<div>
<img class="cam" src="images/cam_3.jpg" width="320"
height="240" name="image3" alt="Image loading ..." id="image3" />
</div>
</body>
</html>