Stand Your Ground Forums
Welcome to Stand Your Ground Forums! Hosted by Forumotion. You can talk about forum/hardware support and anime here!
Stand Your Ground Forums

Welcome to Stand Your Ground Forums! Do register an account before browsing the forum!
 
HomeHome  PortalPortal  RegisterRegister  Log in  
Welcome to Anime World and Support of Forums! Free to interact with everyone and talk about anime , manga and also talk about problems involving connection problems, designs and appearance problems, scripts(coding) problems and much more! Please log in or register if you have not yet. As always, please do not violate the rules and be kind to each other. Have a nice day, folks!

Share | 
 

 Script to disable right click

View previous topic View next topic Go down 
AuthorMessage
limera1n
Moderator
avatar

Posts : 33
Join date : 2013-03-02
Location : Auckland

PostSubject: Script to disable right click   Sun Mar 17, 2013 2:34 pm

Script To Disable The Right-Click On An HTML Page


This tutorial will help you disable the right click of the mouse on your html pages.

There are many codes that can help you with this,but am going to give you one script code that will make this possible.

This script code will allow you to disable the right mouse click by adding it between your body tags ~ . And will also display a pop-up message.

CODE: ----------SELECT CONTENT






Example of this code on my forum ~ Click Here

You can modify the code {the bold part below} if you'd like to change the message that will appear in the pop-up box.

var message="Click Disabled";


Also,there is another code you can use if you don't want the pop-up box.

CODE: ----------SELECT CONTENT





Add the attribute above ( oncontextmenu="return false" ) in the first body tag and it will silently disable right clicks from your mouse.

Example of this code on my forum ~ Click Here


Script To Disable Right Click On Your Forum



Go to your administration panel=>General Tab=>Forum=>Configuration=>General=>Site description=>Add this code

CODE: ----------SELECT CONTENT
function ejs_nodroit() { alert('Text Here');
return(false); } document.oncontextmenu = ejs_nodroit;



You can modify the message you receive when someone right clicks by editing the code's text that says : Text Here

If you would like no pop-up version,you can add this code instead.

CODE: ----------SELECT CONTENT




Written by Master Marc
Updated by limera1n as requested by Master Marc




---------------------------------------------------------------------------------------------------------
limera1n

Forum Moderator
Back to top Go down
 
Script to disable right click
View previous topic View next topic Back to top 
Page 1 of 1
 Similar topics
-
» New link for Zulu Dawn Script
» Click & Drag Game
» I dare you to click.
» Movie #2: How to Train Your Dragon: Story and Script
» Auto-Save Script

Permissions in this forum:You cannot reply to topics in this forum
Stand Your Ground Forums :: Tutorials :: Scripts-
Jump to: