View Full Version : Disabling RIGHT clicking


lindz964
06-24-2006, 12:47 AM
Hello everyone.

I have this code that makes mulitple popups once someone has RIGHT clicked on my page. My question is: Is there a script that can make pop ups for LEFT clicking too? (I need this to prevent several clicks on my submit button in my comment box) Here's the code for RIGHT clicking:

<!-- begin code -->
<script LANGUAGE="JavaScript">
// Right Click Infinate Warning
document.onmousedown=click
var times=0
var times2=10
function click() {
if ((event.button==2) || (event.button==3)) {
if (times>=1) { bye() }
alert("Warning Message Here");
times++ } }
function bye() {
alert("Neverending message");
bye() }
</SCRIPT>
<!-- end code -->
Does anyone know how to convert this code to prevent LEFT clicking instead of RIGHT clicking?

ANY help is appreciated!

amyaurora
06-24-2006, 07:17 PM
I don't know how to convert the code but I did find a script that blocks left and right clicks.

http://codebrain.com/javascript/noClick/

actorderick
07-15-2006, 05:01 AM
why would you want to block left clicks? that would get anoying.