0

My code is:

var openpopup = window.open(hostName1, "Report", "_blank", params);
openpopup.oncontextmenu = false;
Jaap
  • 81,064
  • 34
  • 182
  • 193
Pappu Kumar
  • 21
  • 1
  • 4
  • 2
    Possible duplicate of [How do I disable right click on my web page?](http://stackoverflow.com/questions/737022/how-do-i-disable-right-click-on-my-web-page) – SchattenJager Sep 19 '16 at 14:53

1 Answers1

0

Change your JavaScript to :

var openpopup = window.open(hostname,"Report", "_blank", params);
    openpopup.oncontextmenu = function() {
    return false;
} 

oncontextmenu() is a function not an variable. So you have to assign function to which will return false for disabling right click.

Abhijeet
  • 4,069
  • 1
  • 22
  • 38