Hi guys,

I've got this GREAT, SIMPLE drag & drop layer script that works perfect in IE, but doesn't work right in Netscape and I have had no luck in fixing it so that it works right in NS6.

Here is the code:

PHP Code:
<HTML>
<
HEAD>
<
script language="JavaScript">

var 
dragselect=false;
var 
disX=0;
var 
disY=0;
var 
x=0;
var 
y=0;

function 
captureMouseMove() {
  if (
document.all) {
    
x=event.x;
    
y=event.y;
  } else if (
document.layers) {

    
x=e.pageX;
    
y=e.pageY;    
  }
  var 
obj=document.getElementById("dragObject");

  if (
dragselect) {
    
obj.style.left=x-disX;
    
obj.style.top=y-disY;
  }
}

function 
captureMouseDown() {
  var 
obj=document.getElementById("dragObject");
  
disX=x-obj.offsetLeft;
  
disY=y-obj.offsetTop;
  
dragselect=true;
}

</script>


<style type="text/CSS">

.drag {
    position:absolute;
    left:60;
    top:40;
    width:200;
    height:75;
    background-color:yellow;
    border-style:solid;
    border-width:1px;
    border-color:black;
    padding:2px;
    cursor:hand;
}

</style>
<BODY onmousemove="captureMouseMove();">

<div id="dragObject" class="drag" onmousedown="captureMouseDown();" onmouseup="dragselect=false;">
  Drag me!
</div>

</BODY>

</html> 
Any ideas on getting my "drag n' drop" script to work correctly in Netscape 6??

Thanks--

GregC