On Tue, 03 Jun 2008, gurgel2 wrote: > I want to do a popup menu (using a z-indexed layer) that should closed if i > click anywhere, EXCEPT on the menu itself. > > Its the close "behavior" I need to know. Everything but that, is clear to > me. A similar behavior to a opened desktop app "File,Edit, .. Help" menu > or a context menu (not opened with right button ofcourse).
I'm not a HTML / Javascript expert, but I've heard from them that how JS events get propagated in the DOM hierarchy can be tricky and vary from browser to browser. After trying to circumvent this requirement ;), I would try putting everything on the page in one big div, except for the popup menu that would be outside the úber-div in HTML and positioned over it with absolute positioning or something. This way maybe the menu would get its own clicks because of its higher z-index, and the úber-div would get all the other clicks. But the latter part might depend on how much luck you have with the event propagation and where the users happen to click exactly... Best wishes, Timo -- Timo Rantalaiho Reaktor Innovations Oy <URL: http://www.ri.fi/ > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]