Hi,
so wie das aussieht, haben sich die zwei Timeouts in einer Endlosschleife verstrickt.
Ich denke so geht's:
<script language="JScript" type="text/jscript">
var x = 0;
function move(){
if (x <= 50){x = (x + 1);window.setTimeout("move()",10)}
else moveback();
document.all.box1.style.right = x;
}
function moveback(){
if (x > 0){x = (x - 1);window.setTimeout("moveback()",40)}
else move();
document.all.box1.style.right = x;
}
</script>
Viel Spaß noch,
Ronny