If I take out the variable counter and just set document.getElementById("movee").style.top
equal to a number, it works fine. Combining the variable counter and that bit of code would theoretically get an image to move. It's not working for some reason though!
<html>
<style type="text/css">
#movee
{
position:absolute;
}
</style>
<script type="text/javascript">
function goDown()
{
var counter=1;
while (counter<300)
{
document.getElementById("movee").style.top="counter";
var counter=counter+1;
}
}
</script>
<input type="button" onclick="goDown()" value="Move!">
<img src="test.png" id="movee"></img>
</html>