So...
<html>
<head>
<title></title>
</head>
<script>
xm = 0;
ym = 0;
M = false;
window.onload = function(){
document.onmousedown= function(e){
if (!e) e = window.event;
tg = (e.target) ? e.target : e.srcElement
if(tg.className =="d" && e.button==1){
M = tg;
with(M.style){
xZ = pixelLeft-xm;
yZ = pixelTop-ym;
zIndex = 100;
}
return false;
}
}
document.onmouseup= function(){
if(M){M = false;}
}
document.onmousemove=funct
if (!e) e = window.event;
tg = (e.target) ? e.target : e.srcElement
xm = (e.x || e.clientX);
ym = (e.y || e.clientY);
if(M){
M.style.pixelLeft=xm+xZ;
M.style.pixelTop=ym+yZ;
M.style.zIndex = 100;
return false
}
}
}
</script>
<body oncontextmenu="return false">
<p>
<img src="http://files.opera-in
<img src="http://www.walterzorn
</p>
</body>
</html>
Main Topics
Browse All Topics





by: pD_EOPosted on 2006-02-15 at 07:17:46ID: 15960893
For onmousedown and onmousemove, give the element a zIndex of 100...
obj.zIndex = 100;
:)