I'm no js shark either, but I had created something like that a while ago
and I got around that problem by setting a flag when the mouse was over the
popup (onmouseover) and reset it onmouseout. Then you can use that flag when
detecting the click event.
Frank

On Tue, Jun 3, 2008 at 1:40 PM, gurgel2 <[EMAIL PROTECTED]> 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).
>
> Maybe something like...
>
> final MyMenu myMenu = ...
>
> getPage().add(new AjaxEventBehavior("onclick")
> {
> void onEvent(AjaxRequestTarget target)  {
> myMenu.setVisibible(false);
> target.addComponent(myMenu);
> }
> });
>
>
> ...but than then I have to deal with the "exclusion" of click events on my
> menu popup layer. Any better ideas?
>
> /Kalle
> --
> View this message in context:
> http://www.nabble.com/Ajax-on-click-somewhere-else--tp17621638p17621638.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to