Bugs item #438116, was opened at 2001-07-02 19:51 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105757&aid=438116&group_id=5757 Category: DynAPI 2 Browser-Specific Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Scott Severtson (scottsevertson) Assigned to: Nobody/Anonymous (nobody) Summary: Netscape 4.x MouseEvents & setHTML Initial Comment: In Netscape 4.x, mousedown and mouseup events cease to fire after a call to setHTML after creation. Test case: <HTML> <HEAD> <SCRIPT LANGUAGE="JavaScript" SRC="dynapi/dynapi.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript"><!-- DynAPI.setLibraryPath("dynapi/lib/"); DynAPI.include("dynapi.api.*"); DynAPI.include("dynapi.event.*"); //--></SCRIPT> <SCRIPT LANGUAGE="JavaScript"><!-- DynAPI.onLoad = function() { var test = new DynLayer(null, 0, 0, 100, 100, "#FF0000"); test.setHTML("Click Here"); var listener = new EventListener(test); listener.count = 0; listener.onmousedown = function(e) { layer = e.getTarget(); layer.setHTML("Mouse Down: " + listener.count++); } test.addEventListener(listener); DynAPI.document.addChild(test); } //--></SCRIPT> </HEAD> <BODY> </BODY> </HTML> The counter in the layer should increment, but it does not. One possible route towards solution: Add a call to layer.captureMouseEvents() after the setHTML call. This seems to start capturing events again for the layer. However, it routes all mouse events for the document to the layer's handler's as well. A resource I stumbled across while trying to track this one down: http://www.xs4all.nl/~ppk/js/evcapnn4.html This discusses the relationship between event functions and .captureEvents(), documents and layers. ---------------------------------------------------------------------- >Comment By: Robert Rainwater (rainwater) Date: 2001-08-14 13:46 Message: Logged In: YES user_id=16618 Added a call to captureMouseEvents to mouse.js in CVS that should fix the problem. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=105757&aid=438116&group_id=5757 _______________________________________________ Dynapi-Dev mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/dynapi-dev