how to set oncontextmenu to false

thumbs_up_ico0thumbs_down_ico0
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
thumbs_up_ico1thumbs_down_ico0
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.
thumbs_up_ico0thumbs_down_ico0
Hi Joefer,

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




Cheers,
Tiago Simões
thumbs_up_ico0thumbs_down_ico0
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