Home
Developer Blog
Ajax effects
CSS examples
Freelance jobs
Hot IT Jobs
Hot scripts
Code samples
Web hosting directory
Lotus Notes FAQ
See the new scripts recently added to Dynamic Drive.
Click here
.
Original, practical
CSS codes and examples
such as CSS menus for your site.
Search code samples
Keyword
All Categories
ASP
CSS
Dhtml
Html
Javascript
PHP
Code Samples
ASP
CSS
Dhtml
Html
Javascript
PHP
LOGIN HERE
Username
Password
Signup Now
Forgot Password
Verify Signup
Javascript >> Events
how can i add "NO RIGHT CLICK" for Images?
Visitor Ratings (0) :
Description
Use the script below so when someone right clicks to save an image off your page, a message will come up.
This script only works on newer browsers. Copy and paste the following code.:
Code
Select All
<html> <head> <script language="JavaScript"> <!-- var popup="Sorry, right-click is disabled."; function noway(go) { if (document.all) { if (event.button == 2) { alert(popup); return false; } } if (document.layers) { if (go.which == 3) { alert(popup); return false; } } } if (document.layers) { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=noway; // --> </script> </head> <body bgcolor="#FFFFFF" > <img src="bdaycard.gif"> </body> </html>
Rate this Resource
0
1
2
3
4
5
6
7
8
9
10