On Jan 4, 1:49*am, "Tom" wrote:
> Hi All,
> I have a toolbar that has a couple buttons that must handle the click and
> double click events differently. In other words the command handling logic
> is different for a click event and double click event. The problem is that
> when I do a double click I still get the single click event. I have tried
> impleming the setTimeout function but that does not work at all. Does
> anybody have a idea on how to handle these two events and not both at the
> same time.
> I have been playing around with the following in each event handler
> // Click event
> globaldoubleClick=false;
> window.setTimeout(function(){doSomething();}, 300);
> if(globaldoubleClick)
> *return;
> HandleSingleClickLogic();
> //Dblclick
> globaldoubleClick=true;
> Thanks,
> Tom

Tom... why don't you make use of and having the context
value assigned. Your XUL file will look something like this..

oncommand="RightClickFunction();" />

oncommand="LeftClickFuction();" />