Causes an alert box to be triggered when the visitor right clicks on the web page with the mouse. In other words it disables the standard menu that appears when someone right clicks on your web site and instead shows an alert box. Provides simple, though limited, protection of images, source code, text, and data.
In Microsoft Internet Explorer browsers, the script automatically opens the dialog to add your bookmark to the visitor's favorites. In other browsers like Netscape, the message in the txt variable is shown. You can use an image or text for this add bookmark link.
Causes an alert box to be triggered when the visitor left clicks on the web page with the mouse. You want to use this technique with a little caution and forethought, of course, since it effectively disables any links, etc., on the page where it is used. As to just why and what for you'd use this technique, well, we're a little puzzled about that, too... but someone wrote in and asked for it, so here it is. Only works in Microsoft Internet Explorer, Netscape completely ignores it.
A useful technique for display only pages, as well as protecting your underlying source code. You want to use this technique with caution and forethought, of course, since it effectively disables any mouse action on the page. The technique is most useful in display-only pop ups, as shown in this demo. Note that this technique only works in Microsoft Internet Explorer, Netscape completely ignores it.
Visitors can save a web page from a link using this script. IE4+ browsers provide a document.execCommand that can call certain system dialogs. This script demonstrates calling the SaveAs dialog to save the page. The script includes onload interlocking and alternate alert messaging for non-IE browsers. Note that the script can only be used to save the current page; that is, the page in which the script is included.
In IE 5 and later browsers, clicking the link opens the dialog to set the current page as the visitor's homepage. An IE conditional comment prevents the link from showing in other browsers that do not support this. In other words it degrades gracefully in browsers that do not support this feature.
Use this script to launch a popup window whenever the right mouse button is clicked. Useful for limited protection of page code and images; and the popup window can contain whatever fulmination on human morals you wish to deliver. The script allows you to also set the address, width, height, top, and left dimensions for the popup window.