Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Need help to supress the right click option for user in ABAP Web dynpro

Former Member
0 Kudos
63

Hi Experts,

I got a requirement to suppress the right click option in ABAP web dynpro, so that user should not access the context menu (like settings for hiding and technical help detail). I need to do this at the Web dynpro application level for all the views.

Appreciate your help in this.

Thanks

Rajan.

1 REPLY 1

jaideeps
Product and Topic Expert
Product and Topic Expert
0 Kudos
35

hi,

it can be done using the javascript....

<SCRIPT TYPE="text/javascript">

var message="Sorry, right-click has been disabled";

function clickIE() {if (document.all) {(message);return false;}}

function clickNS(e) {if

(document.layers||(document.getElementById&&!document.all)) {

if (e.which==2||e.which==3) {(message);return false;}}}

if (document.layers)

{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}

else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")

</SCRIPT>

thanks

jaideep

*reward points if useful..