Events are handled differently in IE and Mozilla. This one works in IE6:
Code:
<html>
<head>
<script>
//sorry for sloppy script just testing
movecounter = 0;
function move1(e){
playerxspeed=3;
playeryspeed=3;
oveTox=e;
oveToy=600;
document.getElementById('you1').style.posLeft +=playerxspeed;
document.getElementById('you1').style.posTop +=playeryspeed;
movetimer = setTimeout("move1();",60);
movecounter += 1;
tempc = movecounter*playerxspeed;
if(tempc >= oveToy){
clearTimeout(movetimer);
}
}
</script>
</head>
<body>
<table width="800" height="800">
<tr>
<td onclick="move1(event.clientX)">
<IMG id="you1" SRC="some.jpg" STYLE="position: absolute; z-index:3">
</td>
</tr>
</table>
</body>
</html>
Bookmarks