By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,928 Members | 1,580 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,928 IT Pros & Developers. It's quick & easy.

How to handle context menu cancellation event

P: 1
I am trying to implement a system to mask affiliated links
of a web page. I can handle user's right click with
oncontextmenu event and mask the link without any problem
but when user cancels context menu, link value is been

Expand|Select|Wrap|Line Numbers
  1. link.oncontextmenu = function () {
  2.   link.href = "http://......";          
  3. }
I cannot find a way to handle when user cancel context
menu to change link's value into its original value.

Any idea?

Mar 8 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.