let us know if you got it.
this a sample code to drag inside the same window-->>
----------------------
<html>
<head>
<title>Drag 'n' Drop</title>
<script type="text/javascript">
<!--
drag = 0;
move = 0;
function setDiv(dragger)
{
dragDiv = dragger;
drag = 1;
}
function startdrag()
{
window.document.onmousedown = mouseDown;
window.document.onmouseup = mouseUp;
window.document.onmousemove = mouseMove;
window.document.ondragstart = mouseEnd;
}
function mouseDown()
{
if (drag==1)
{
clickleft = window.event.x - parseInt(dragDiv.style.left);
clicktop = window.event.y - parseInt(dragDiv.style.top);
move = 1;
}
}
function mouseEnd()
{
window.event.returnValue = false;
}
function mouseMove()
{
if (move==1)
{
dragDiv.style.left = window.event.x - clickleft;
dragDiv.style.top = window.event.y - clicktop;
}
}
function mouseUp()
{
move = 0
}
//-->
</script>
</head>
<body onLoad="startdrag()">
<div id="north" onMouseOver="setDiv(north)" style="cursor: move; position: absolute; left: 10; top: 35">
MO
</div>
<div id="south" onMouseOver="setDiv(south)" style="cursor: move; position: absolute; left: 10; top: 5">
W
</div>
<div id="east" onMouseOver="setDiv(east)" style="cursor: move; position: absolute; left: 10; top: 20">
E
</div>
<div id="west" onMouseOver="setDiv(west)" style="cursor: move; position: absolute; left: 10; top: 50">
VE
</div>
</body>
</html>
----------------------
also if you open a child window from certain window
you could use
window.opener.document.all.item('ObjName').value=C ertainValue
to assign values to parent window
Hope That help To Continue...
Ahmed Ali
Software Developer
|