Topic Areas
Free Scripts
Information
Resources
Tutorials
Information
Search
Help Forums
Contact
Link to Us
Submit Script
Privacy Policy
More Resources
Free Stuff
Web Resources
Other Links
PageResource.com: Learn HTML
Just Free Stuff
JavaScript City
No Right Click

Script Introduction

Keep in mind, no "right click" script truly offers security for your content and likely will not work in browsers other than Internet Explorer. These can easily be bypassed by those who are knowledgeable about their browsers. Do not use this as actual protection for anything.

This script disables the right click menu in Internet Explorer browsers, at least if the viewer right clicks rather than using other methods to bring up the menu. This script can be bypassed by using Netscape (or other browsers), hitting SHIFT+F10, and various other ways.

Cut and Paste Code: HEAD Section
This code should be placed between the <head> and </head> tags.

Installation Instructions

  1. Paste the HEAD Section code from above between the <head> and </head> tags on your page.
  2. Find the matching lines below in the script and change the text in red to the text you wish to use:

    window.alert('Ha, ha, ha! No right click!');

  3. Check the Format Window to be sure you do not have one single line of code, or too many line breaks in the code.

Example

A working sample of the script is shown below. Click the link to open a new page and test the script.

Example Link

JavaScript Book
JavaScript: A Beginner's Guide
by John Pollock
What's New
Simple Searchbox script added.
More...
Web Xpertz
Find more JavaScript tools and resources at WebXpertz City! Click one of the links above to browse the various attractions within the city.