2007 Jun 26 8:44 AM
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.
2007 Jul 12 1:58 PM
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..