how to set oncontextmenu to false

how to set oncontextmenu to false

  
Hi,

I would to ask if its possible to set the oncontextmenu to false in outsystems. One of our requirement is to disable the displaying of the context menu everytime the user tries to right click on a web page.

Thanks,

Joefer
Hi,

Try adding the code below to your screen javascript (click on the screen, double-click Javascript), or into an unescaped expression (in a <script...> tag). I didn't try it, but it should work...

  1. window.oncontextmenu = function () {  
  2.    return false;  
  3. }  

If you want to affect a set of screens, you can use it in a web block instead.
Hi Joefer,

Try to add document.body.oncontextmenu = function() {return false;}  to the webscreen javascript:




Cheers,
Tiago Simões
Paulo Ramos wrote:
Hi,

Try adding the code below to your screen javascript (click on the screen, double-click Javascript), or into an unescaped expression (in a <script...> tag). I didn't try it, but it should work...

  1. window.oncontextmenu = function () {  
  2.    return false;  
  3. }  

If you want to affect a set of screens, you can use it in a web block instead.
 
 I had similiar problema and this worked for me. Thanks