hi, I´m experemting with dragging and everything works fine. I also found out how to get the X & Y position of the layer and print it out as an alert.
What I need now is to write the result into the html body, as an hidden input tag, so I can read it with php. here´s the code: ############################################################################# <html> <head><title>drag & drop</title> <Script language="Javascript" src="../../gs/src/dynapi.js"></script> <Script language="Javascript"> DynAPI.setLibraryPath('../../gs/src/lib/') DynAPI.setLibraryPath('../../gs/src/lib/') DynAPI.include('dynapi.api.*') DynAPI.include('dynapi.event.*') DynAPI.include('dynapi.ext.inline.js') </script> <? include ("./../php_head.php"); ?> <Script language="Javascript"> DynAPI.onLoad=function() { b = DynAPI.document.all["marokko"] myLayer=new DynLayer(null,100,100,100,100,'#c0c0c0','show',15) DynAPI.document.addChild(myLayer) DragEvent.setDragBoundary(myLayer) // this line sets the boundaries DragEvent.enableDragEvents(myLayer) DragEvent.setDragBoundary(b) // this line sets the boundaries DragEvent.enableDragEvents(b) myListener=new EventListener(myLayer) myListener.onmouseover=function(e) { target=e.getTarget() target.setBgColor('#0000f0') } myListener.onmousedown =function(e) { target=e.getTarget() target.setBgColor('#c0c0c0') target.setZIndex ('16') } myListener.onmouseout=function(e) { target=e.getTarget() target.setBgColor('#c0c0c0') target.setZIndex ('10') } myListener.onmouseup=function(e) { target=e.getTarget() target.setBgColor('green') x = target.getX () l = target.getY () schreibe() } myLayer.addEventListener(myListener) hoere=new EventListener(b) hoere.onmouseover=function(e) { target=e.getTarget() target.setBgColor('#0000f0') } hoere.onmouseout=function(e) { target=e.getTarget() target.setBgColor('#c0c0c0') target.setZIndex ('10') } hoere.onmousedown =function(e) { target=e.getTarget() target.setBgColor('#c0c0c0') target.setZIndex ('16') } hoere.onmouseup=function(e) { target=e.getTarget() target.setBgColor('green') x = target.getX () l = target.getY () alert(" top: " + x + " left: " + l) } b.addEventListener(hoere) } </script> </head> <body bgcolor="#FFFFFF"> <div id="marokko" style="position: absolute; top: 10 px; left:20px; width:67px; height:100px; z-index:16"> <img src="marokko_01.jpg" title="marokko_01.jpg"> marokko_01</div> <form> <Script language="Javascript"> {function schreibe() document.write("hallo!"); } </script> </form> </body> </html> ############################################################################# Is there a possibilty to do so? thx in advance armin ------------------------------------------------------- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Dynapi-Help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dynapi-help