Disable Right Click

Post new topic   Reply to topic

View previous topic View next topic Go down

Disable Right Click

Post by Marc on Fri Oct 23, 2009 9:10 pm

This tutorial will help you disable right clicking on your web pages, Wink

Disable Right Click Script

This script will disable right clicking on your web pages.

Code:
<body oncontextmenu="return false"</body>


When this is added, your visitors can not right click on your web page. This is like a silent version of disabling right clicking.


Pop Up Message After Right Click To Disable It

This script will disable right clicking on your web pages, and everytime you right click, a pop up message box will appear. Ofcourse, you can modify the text that will be displayed in the pop up box.

Script :
Code:
<script language=Javascript1.2> function ejs_nodroit() { alert('Text Here'); return(false); } document.oncontextmenu = ejs_nodroit;</script>


Find this part in the script, and edit the bold part, to edit the text that will be displayed in the pop up box.

{ alert('Text Here');

Marc
Administrator
Administrator

Posts: 321
iCoins: 643

View user profile http://www.iwebbuddy.com

Back to top Go down

View previous topic View next topic Back to top


Post new topic   Reply to topic
Permissions of this forum:
You cannot reply to topics in this forum