Patches item #444994, was opened at 2001-07-26 17:06 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=305757&aid=444994&group_id=5757 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: DragEvent.enableDragEvents() cross-frame Initial Comment: Hey all.. The site still won't send me my password. Anyways, While working with DynAPI across frames I noticed that using DragEvent.enableDragEvents(lyr) from frame1 to make a layer in frame2 draggable did not work. I have modified DragEvent.enableDragEvents() to accomadate dragging an object that has been created in a frame other than the one containing the DynAPI. ------------ DragEvent.enableDragEvents=function(f,theDoc) { for (var i=0;i<arguments.length;i++) { var lyr=arguments[i]; if (lyr.isDynLayer) lyr.addEventListener(DragEvent.lyrListener); } if(f.isDynDocument) f.addEventListener (DragEvent.docListener); else if (theDoc) theDoc.addEventListener (DragEvent.docListener); else DynAPI.document.addEventListener (DragEvent.docListener); }; ------------ Significance of the changes: The function now takes an addition paramater which is a reference to a DynDoc in a particular frame. This DynDoc would be created with MyDoc = new DynDocument(top.frame2); then, to make a layer (myLayer) draggable in frame2 (MyDoc) from frame1: DragEvent.enableDragEvents(myLayer,MyDoc); --- If this is not clear, just email the list and I will try to clarify. Later ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=305757&aid=444994&group_id=5757 _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/dynapi-dev