Hi, can anybody please tell me what's wrong with this code? The part I'm interested in is where text is being put between the div-tags. I get the error message that document.htmlClock is undefined or not an object. I got this example straight out of a magazine but it just doesn't work :-( I tried both IE 5.5 and Opera 6.
It's not a lie if YOU believe it ;-)
Code:
<html>
<head>
<title></title>
<script language="javaScript">
<!--
function doClock(){
today = new Date();
document.htmlClock.innerText = today.getHours() + 'u' + today.getMinutes() + 'm' + today.getSeconds();
setTimeout('doClock()', 1000);
}
//-->
</script>
</head>
<body onLoad="doClock();">
<div id="htmlClock"></div>
</body>
</html>