Skip to search.
ydn-javascript · Yahoo! User Interface Library Group

Group Information

  • Members: 10919
  • Category: JavaScript
  • Founded: Dec 15, 2005
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

  Messages Help
Advanced
How do I catch rightClick?   Message List  
Reply Message #3206 of 52481 |
Re: [ydn-javascript] How do I catch rightClick?

You can use a simple addListener like so:
YAHOO.util.Event.addListener([HTMLObject], 'contextmenu', CallBackFunction);
You can see a working example here:
http://blog.davglass.com/files/yahoo/

FYI, I am also using the YAHOO.namespace in the example.

 
Dav Glass
dav.glass@...
davglass.com
618.694.3476

+ Windows: n. - The most successful computer virus, ever. +
+ A computer without a Microsoft operating system is like a dog
without bricks tied to its head +
+ A Microsoft Certified Systems Engineer is to computing what a
McDonalds Certified Food Specialist is to fine cuisine +


----- Original Message ----
From: mark.deibert <mark.deibert@...>
To: ydn-javascript@yahoogroups.com
Sent: Sunday, July 23, 2006 3:34:11 PM
Subject: [ydn-javascript] How do I catch rightClick?

I can't find any info here or in the docs. How do I listen for mouse
rightClick events?

Thanks guys :-)




Sun Jul 23, 2006 11:41 pm

dav.glass
Offline Offline
Send Email Send Email

Message #3206 of 52481 |
Expand Messages Author Sort by Date

I can't find any info here or in the docs. How do I listen for mouse rightClick events? Thanks guys :-)...
mark.deibert Offline Send Email Jul 23, 2006
10:45 pm

You can use a simple addListener like so: YAHOO.util.Event.addListener([HTMLObject], 'contextmenu', CallBackFunction);You can see a working example here: ...
dav.glass@...
dav.glass Offline Send Email
Jul 23, 2006
11:41 pm

Oh 'contextmenu' is the rightClick event. Thanks Dav! ... docs. How do I listen for mouse...
mark.deibert Offline Send Email Jul 24, 2006
11:19 am

I'm trying to attach a rightClick listener to a IMG tag. It's not working. I'm not using YAHOO.namespace in my code but I know that's not the problem. Is there...
mark.deibert Offline Send Email Jul 24, 2006
9:10 pm

It should be the same as attaching it to any other item.. Can you show us the sample code? I have added a rightClick to an image on this example: ...
dav.glass@...
dav.glass Offline Send Email
Jul 24, 2006
9:29 pm

Nevermind, it works fine. My goof :-\ Thanks again Dav :-) ... docs. How do I listen for mouse...
mark.deibert Offline Send Email Jul 24, 2006
9:28 pm

np, anytime 8-) Dav Glass dav.glass@... davglass.com 618.694.3476 + Windows: n. - The most successful computer virus, ever. + + A computer without a...
dav.glass@...
dav.glass Offline Send Email
Jul 24, 2006
9:36 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help