-1

I am interested in eliminating chrome's right click menu on a right click and execute a new function.

Currently, I do the following:

new_tab_li.oncontextmenu = myFunction;

This excutes "myFunction" but, it also opens up chrome's right click menu.

dreamer.psp
  • 615
  • 7
  • 12
  • Duplicate: http://stackoverflow.com/questions/6789843/disable-right-click-menu-in-chrome?rq=1 – metadings May 13 '13 at 14:41
  • 1
    possible duplicate of [How to disable right-click context-menu in javascript](http://stackoverflow.com/questions/381795/how-to-disable-right-click-context-menu-in-javascript) – Chamika Sandamal May 13 '13 at 14:43

1 Answers1

0

You have to do return false; inside your custom function

function myFunction{
  // Your code
  return false;
}
Chamika Sandamal
  • 23,565
  • 5
  • 63
  • 86