Deactivate right-clicks for AskiaWeb surveys
Summary | This article describes how to deactivate the ability to right-click in AskiaDesign web surveys by using JavaScript. |
Applies to | AskiaDesign |
Written for | Scriptwriters and survey authors |
Keywords | script; right click; deactivate; javascript; design; askiadesign |
To deactivate right-clicks in AskiaWeb surveys, put the JavaScript snippet below in the Head or Footer tag of the appropriate page in the Internet Settings modal:
<script language="JavaScript"> var message="Sorry, No Right Click Allowed!!!"; function clickIE6(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE6; } document.oncontextmenu=new Function("alert(message);return false") </script>