3
Views
3
Comments
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
2012-03-02 13-17-21
Paulo Ramos
Staff
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.
UserImage.jpg
kalkulator kredytowy
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
2011-08-23 22-04-05
Tiago Simões
Staff
Hi Joefer,

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




Cheers,
Tiago Simões
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.