Im am trying to use Javascript to make a <div> creep along the page but for some reason the argument inside of the creepinglayer function is not valid. Below is the whole html code w/ script included:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Creeping Layer</title>
<style>
#myBox { position:absolute; left:100px; top:50px; width:100px; height:100px;
background-color:#0000FF; }
</style>
<script language="javascript" type="text/javascript">
function creepinglayer() {
document.getElementById("myBox").style.left = eval(parseInt(document.getElementById("myBox").style.left) + 1) + "px"
}
</script>
</head>
<body>
<div id="myBox">
I'm gonna be moving!
</div>
<script language="javascript">
var myTimer = window.setInterval("creepinglayer();", 10)
</script>
</body>
</html>
Thanks for any help that is posted!


