iWebBuddy.com - Website Design and Web Development Forum
Thanks for visiting iWebBuddy.com ,

If it is your first time here, please enjoy reading the tutorials and articles. If you can not find what you're looking for, then you can join the forums by registering so you will be able to log into the forums and ask for support for website development, request graphic designing services, promote your website, request website reviews, get advice from others about your website or be an active member of the community to help iWebBuddy.com grow.

After you register an account, you are required to log in. Once you log into your account, you will have more privileges. You will be able to post on the forums, send private messages and view the Chatbox ( link ) at the bottom of the forums.

Have a nice day.

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 iPlan() {
alert('Text Here');
 return(false);
}
document.oncontextmenu = iPlan;
</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 Posts: 1119
iCoins iCoins: 2197
Forum Pet: Website Design and Development Monster

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

Back to top Go down

View previous topic View next topic Back to top


Permissions of this forum:
You cannot reply to topics in this forum