This is from a drag script I modify for different purposes, there is a cross browser script too but, this should suffice for IE
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HEAD>
<TITLE>__</TITLE>
<STYLE type=text/CSS>
</STYLE>
</HEAD>
<body style="background-color: #FFCC00; ">
<div id="graybox" style="width: 800px; height: 350px; margin: 100px auto; background-color: #CCCCCC;">
<div id="pointer" style="width: 10px; height: 50px; background-color:#0099FF; position:relative "></div>
</div>
<SCRIPT type="text/javascript">
var moveapproved=false; var z,x,y,w;
function move(){
if(moveapproved){z.style.pixelLeft=event.clientX-10; return false;}
}
function moves(){
moveapproved=true; z=document.getElementById('pointer');w=document.getElementById('graybox')
x=event.clientX;y=event.clientY;document.onmousemove=move;
}
document.getElementById('graybox').onmouseover=moves;
document.getElementById('graybox').onmouseout=new Function("moveapproved=false");
</SCRIPT>
</BODY></HTML>
Bookmarks