I am conducting some Psych experiment on web design, and I want to disable both mouse clicks. (Please ignore usability issues. I know about them. I intentionally do this for the purpose of my psych experiment.)
So far I succeeded disabling both clicks in Firefox, Chrome, and Safari. In IE, however, when I left click, focus still changes to the place I clicked. I want to stop this behavior (i.e. focus remains the place before I click). It doesn't matter whether the system produces alert or not, because I'm going to use alert anyway.
I appreciate if some of you can help me. Please note that I CAN'T use JQuery. My experiment tool cannot handle JQuery well.
<html>
<head>
</head>
<body>
<div>
<select>
<option> aa </option>
</select>
</div>
<div>
<select>
<option> aa </option>
</select>
</div>
<script type="text/javascript">
function mousehandler(){
alert("For the purpose of psych experiment, you can't use mouse.");
return false;
}
document.oncontextmenu = mousehandler;
document.onmousedown = mousehandler;
</script>
</body>
</html>