Hi, This is true except `isXXXClick` are not properties but methods. The correct snippet would then be:
Event.observe(element, 'mousemove', function(evt) { if(evt.isLeftClick()) alert('left button clicked'); if(evt.isMiddleClick()) alert('middle button clicked'); if(evt.isRightClick()) alert('right button clicked'); }); Best, Samuel. On Dec 9, 4:24 pm, david <david.brill...@gmail.com> wrote: > Hi Frédéric, > > When observing an event with: > Event.observe('mousemove',function(evt){ > if(evt.isLeftClick) alert('left button clicked'); > if(evt.isMiddleClick) alert('middle button clicked'); > if(evt.isRightClick) alert('right button clicked'); > > }) > > there is inside the event object some shortcut to know at the moment > the event is fired if a button is clicked. And the same existe in case > of a key pressed. > > -- > david > > On 8 déc, 15:07, Frédéric <f...@gbiloba.org> wrote: > > > > > Le mardi 8 décembre 2009 13:54, Alex McAuley a écrit : > > > > ...observe('mousemove',function(e) { > > > > $('SomeElement').observe('click',function() { > > > doSomethingWIthyourClick(); > > > Ok, so I have to register both events... > > > Thanks :o) > > > -- > > Frédéric -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.