Ole: Mit NS 4.7 & IE >5 klappts, nur mit NN 6 nicht :(...warum?

Beitrag lesen

hi

hab ein kleines script zum bewegen von divs:

<html>
<head>
 <title>test</title>

<script language="JavaScript">
<!--

ns4 = (document.layers)? true:false
// other = (document.all)? true:false
other = (document.layers)? false:true

function init() {
 if (ns4) block = document.blockDiv
 if (other) block = blockDiv.style
 block.xpos = parseInt(block.left)
 block.ypos = parseInt(block.top)
 block.angle = -90
 block.xinc = 5*Math.cos(block.angle*Math.PI/180)
 block.yinc = 5*Math.sin(block.angle*Math.PI/180)
 block.count = 0
}

function slide() {
 if (block.count < 60) {
  block.xpos += block.xinc
  block.ypos -= block.yinc
  block.left = block.xpos
  block.top = block.ypos
  block.count += 1
  setTimeout("slide()",30)
 }
 else block.count = 0
}

function restart() {
 block.count = 0
 moveTo(block,150,150)
}

function moveTo(obj,x,y) {
 obj.xpos = x
 obj.ypos = y
 obj.left = obj.xpos
 obj.top = obj.ypos
}

//-->
</SCRIPT>

</head>

<body onLoad="init();slide();">
<DIV ID="blockDiv" STYLE="position:absolute; left:300px; top:-200px; width:145px; height:145px; clip:rect(0,145,145,0); layer-background-color:red; background-color:red;">
 
</DIV>

</body>
</html>

sowohl der NN 4.7 als auch der IE >5 haben keine probleme mit dem script. nur der NN 6.22 muckt...kann mir einer sagen warum? *betriebsblindbin*

thx
so long
ole
(8-)>