M
mmalloc
I have the following code to move some text with javascript that works
both on ie and ff. I can't make it XHTML compatble. If i remove the
doctype info it will work. I'm sorry to bother with such simple
question but is there someone to see where am i wrong?
<!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">
<script type="text/javascript">
function TextMove(val) {
try {
var divObj = document.getElementById("mouseCoord");
divObj.innerHTML = "Moving";
divObj.style.left=parseInt(val);
}
catch (ex) { alert (ex); }
}
</script>
</head>
<body onload="TextMove(0);">
<div>
<div id="mouseCoord" onmouseover="TextMove(10);"
onmouseout="TextMove(0);" style="position:relative;"> </div>
</div>
</body>
</html>
both on ie and ff. I can't make it XHTML compatble. If i remove the
doctype info it will work. I'm sorry to bother with such simple
question but is there someone to see where am i wrong?
<!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">
<script type="text/javascript">
function TextMove(val) {
try {
var divObj = document.getElementById("mouseCoord");
divObj.innerHTML = "Moving";
divObj.style.left=parseInt(val);
}
catch (ex) { alert (ex); }
}
</script>
</head>
<body onload="TextMove(0);">
<div>
<div id="mouseCoord" onmouseover="TextMove(10);"
onmouseout="TextMove(0);" style="position:relative;"> </div>
</div>
</body>
</html>