Setting Style.top is not working in IE!!
i'm having a function which moves the div form one place to other.
It's working nicely on firefox.. but it doesn't seems to be working in IE..
I couldn't find the problem!!!
Here's the function i'm using
I'm calling the function as this
var fun = "moveup('"+id+"')";
var df = document.getElementById(id);
toppos = (df.style.top).replace('px','')-2;
df.style.top = toppos+"px";
timer2 = setTimeout(fun,50);
I'm having the div as a relatively positioned object..
<img name=address style="height:20px;cursor:pointer;"
onmouseup="stopy()" alt="Move up" title="Move up">
The function is called in IE and it returns "object" when i alerted the object passed to the function moveup()..
<div id='amt' style="position: relative; top:-165px; left:200px;
The div is moving nicely in firefox but not in IE..
What's the problem and how can i correct that?
Thanks in advance