Scroll

Deactivate right-clicks for askiaweb surveys

Deactivate right-clicks for askiaweb surveys

Follow
Summary This article describes how to deactivate the right clicks for askiaweb surveys in askiadesign by using JavaScript.
Applies to askiadesign
Written for Scriptwriters and survey authors
Keywords script; right click; deactivate; javascript; design; askiadesign

To deactivate right-clicks on askiaweb surveys, put the below JavaScript snippet 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>
Have more questions? Submit a request

Comments