Try
something like:
dragListener=new
EventListener(dragObj)
dragListener.ondragend=function(e)
{
}
}
dragObj.addEventListener(dragListener)
-----Original Message-----
From: Arthur Dardia [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 25, 2002 1:21 PM
To: [EMAIL PROTECTED]
Subject: [Dynapi-Help] stop drag event listener?Hey all,
I'm new to the list, but I hope to get involved more. I'm trying to develop a site that using some sort of DHTML engine in order to implement a layering system. My goal is to create a new interface that will load a set of layers:Each layer will have a Z+ icon to increase it's Z index, a Z- icon to decrease it's Z index, and an X icon to "close" the layer. There will be a lock layers icon and a unlock layers icon that will globally lock/unlock all layers to their current positions. The goal is to use this to allow users to reconfigure orderoutfood.com to their tastes. Layer would be a
shopping cart layer, a restaurant selection layer, a menu selection layer, a product review layer, etc. Eventually, this layers will be docking to allow smoother connections; however, write now having them "float" is fine. Currently, I have this code to create a layer; however, how do I add a listener to detect after a drag was performed. The reason I need to do this is so that I can update a cookie with the layer's name/position so they can be read back when the user loads. Eventually, a database will be tied to this and when you "lock the layers" it'll open a popup-window, contact the server, and store your preferences with requiring a new page load. However, for now, cookies will work fine. Any idea how to detect a stopDragEvent type event with DynAPI, or has one not been implemented yet.
---snip---
<html>
<body bgcolor=#000000 text=#ffffff>
<title>reconfigurable website</title><script language="JavaScript" src=""></script>
<script language="Javascript">
dynapi.library.setPath('../src/dynapi/');
dynapi.library.include('dynapi.api');
dynapi.library.include('DragEvent');
</script><script language="Javascript">DynAPI.onLoad(function() {block = new DynLayer();
block.setSize(300,300);
block.setLocation(100,100);
block.setBgColor("red");
DragEvent.enableDragEvents(block);
block.setHTML("<table cellspacing=0 cellpadding=0 width=100%><tr><td bgcolor=yellow width=100%><p align=right><a href="" src="" border=0></a></p></td></tr><tr><td>This is an example layer.</td></tr></table>");DynAPI.document.addChild(block);
});//-->
</script><p align=right><a href="">lock layers</a><a href="">unlock layers</a></p>
</html>
---snip---Regards,
Art Dardia
_____________________________________________
Computer Science and Computer & Systems Engineering
Rensselaer Polytechnic Institute
284 Pawling Ave., Troy, NY 12180 USA
phone: (518) 271-6521 :: cell: (973) 626-6819