Currently, there is no option to disable right-click on a question.
With the script and instructions outlined in this document, you can add a script that will not allow the user to right-click while completing the question. If the user tries to right-click, a message will pop up displaying Function Disabled!.
Example
One potential use of this functionality would be to dissuade members from saving images shown in a survey since the right-click Save As... menu option is now unavailable.
Detailed Steps
- Navigate to the question, page or text instruction where you wish to disable right-clicking.
- Copy the script below.
- Insert the completed script into the Script section by doing the following:
- Select the question, page or text instruction in the Questionnaire Tree.
- In the Scripting section of the page, click Edit Scripts.
- Paste the script into the JavaScript tab.
- Click Save.
- Click Validate and test your survey.
Script:
/*Script Name: How do I disable right-click functionality on a question or page? (Power Surveys)
To ensure your script works as expected, always copy the original script from the script library found in the support portal. Failure to use the most up to date script from the script library may cause unexpected results.
*/
<SCRIPT language=Javascript> var message="Function Disabled!"; function clickIE4(){ 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=clickIE4; } document.oncontextmenu=new Function("alert(message);return false") </SCRIPT>
Comments
0 comments
Article is closed for comments.