Prevent Right-clicking

Prevent Right-clickingIf you don't want your visitors to rightclick at your page, you can insert this code somewhere between <Body> and </Body>. Type in the message you want your visitors to get in the line "Write your message here"

<script language=JavaScript>
<!--

var message="Write your message here";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById & & !document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all & & !document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>


Related Articles

  • Prevent Directory Listing
    Whenever you have folders with large amounts of files or important administration files, it is essential to prevent directory listings, otherwise all of the files in the folder will be listed to anyone who wants to see them, including hackers. When hackers can find an administration file, it makes t...
  • The Google Trap: A Warning
    If you happen to use Googles proprietary meta tag: the search results pages will only display your web pages ti...
  • Stop Spam
    Preventing your e-mail that you placed on your site from being found by spammers is very hard. Some have even taken their e-mail addresses off their sites and replaced them with contact forms to prevent this. Here is a neat .htaccess method to help put a stop to this. This will stop many of the bo....
  • Why do we Need Privacy Protection when we Buy Domain Names?
    Also known as Private Registration This is a term involved with domain name registration. And it literally means you domain name registration details are kept private or in other words your personal details such as your name, home/ office address, email address and phone numbers are not display......
  • No Direct Linking
    If you want to prevent those awful direct linkers, use this tutorial. Open up your notepad (start>>programs>>accessories>>notepad) or another text editor, and copy the code below to it. Name this file .htaccess and make sure it doesnt have an extension on the end, like .txt. If i....
  • 5 Smart Ways to Keep Your Domain Name Safe
    Your domain name is more than just a web address for your online business. Its your image on the Web and a powerful branding tool. Its also a valuable asset that you must take steps to protect.
  • Tips to Create Banners that Make People Rush to Your Website
    This short article gives you good advice for designing and using banners. The article discusses motion, color, placement, and wording among other considerations.
  • Creating a Robots.txt file
    Some people believe that they should create different pages for different search engines, each page optimized for one keyword and for one search engine. Now, if you do decide to create such pages, there is one issue that you need to be aware of...
  • Google Secrets!
    Bypass the Search Results-and Go Directly to the First Page on the List
    You have another option after you enter your search query, other than clicking the Google Search button.
  • How To Choose A Profitable Domain Name
    Choosing a domain name for your website is a very important decision, and should not be taken lightly. A bad choice of name could seriously affect the potential profitability of your online business, and prevent it achieving as much success as it should do.

Contact Web Design Outsource and get started today

Need Website Designing, Development, Redesigning, Maintenance and SEO services or help growing your company's web presence? Request a free Quote Now.