School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

 

Code Snippets

  

HTML/CSS Source Code


Welcome to Dream.In.Code
Become an Expert!

Join 340,115 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 4,311 people online right now. Registration is fast and FREE... Join Now!




No Right Click

No right click, which doesnt let people like, let people see your page code, or save anything that right click allows people to take stuff from your page.

Submitted By: vip3r4lif3
Actions:
Rating:
Views: 7,466

Language: HTML/CSS

Last Modified: August 4, 2006
Instructions: Put the code below under the head tag.

Snippet


  1. <script language="JavaScript">
  2. <!-- var popup="Sorry, right-click is disabled.\n\nThis Site Copyright ©2006"; function noway(go) { if
  3. (document.all) { if (event.button == 2) { alert(popup); return false; } } if (document.layers)
  4. { if (go.which == 3) { alert(popup); return false; } } } if (document.layers)
  5. { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=noway; // -->
  6. </script>

Copy & Paste


Comments

coaster3000 2009-08-24 15:37:23

This is great thanks. But i'm not sure if i'm going to need this yet. So i will wait. ;) well i might need it for certain things. 5/5 rating

kewlkreator 2009-09-07 01:11:33

This won't stop them for long. Only beginner users.

bammurdo 2009-10-11 07:29:48

As Kewlkreator said, this will only stop beginners ... a more advanced/intermediate person would be able to get around it. For example, they could just disable Javascript ... bam :)


Add comment


You must be registered and logged on to </dream.in.code> to leave comments.





Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month