lamy
Regular
i have a floating DIV tag which moves along with the page, already tested it on modern browsers (with .HTM as extension, tested with IE6, NS8, Opera 8, Firefox 1.5 and Safari 1.x), it was working but it doesnt when i inserted the same code in my ASPX page.
heres the same html page im using
there seems to be a problem with document.getElementById but it is client-side, it shouldnt affect my ASP.Net page or theres something that i should be doing to make it work, anyone?
heres the same html page im using
Code:
<html>
<script language="javascript">
function moveDIV(source)
{
var frame = document.getElementById("floatingDIV");
var offset = 0;
// IE compatible
if ((document.all?true:false) == true)
offset = source.scrollTop;
else
offset = document.body.scrollTop;
frame.style.top = offset;
}
</script>
<body OnMouseMove="moveDIV(this)">
<div id="floatingDIV" style="position:absolute">
This is the floating DIV
</div>
<p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p>
<p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p><p>-</p>
</body>
</html>
there seems to be a problem with document.getElementById but it is client-side, it shouldnt affect my ASP.Net page or theres something that i should be doing to make it work, anyone?