Author Topic: How to to disable right click using javascript?  (Read 630 times)

0 Members and 1 Guest are viewing this topic.

Offline ebenzunlimited

  • Lead Admin
  • *****
How to to disable right click using javascript?
« on: May 24, 2012, 10:26:51 PM »
a Faster web hosting service
I am posting this article as per the one of my user request. It is easy to disable right click in a website using javascript.

Code to disable:
oncontextmenu="alert('right click is disable');return false;"

now you may have doubt about placing this javascript code. This code should be in body as one of the attribute.

I think you can understand better if i give example.
<body oncontextmenu="alert('right click is disable');return false;"
>

i think now you understand.

see , this will disabled only for usual internet users. You can not protect it from h*ckers. We can disable javascript simply using webtool bar add on
Insane I Lived♥ Sane I Died♥<img src='http://i253.photobucket.com/albums/hh74/reallytired2/family%20pictures/buckeye%20stuff/clap.gif' />

Online zeal

  • Lead Admin
  • *****
How to open links in new tab for sites whose right click is disabled
« Reply #1 on: July 09, 2012, 08:24:26 PM »
How to open links in new tab for sites whose right click is disabled

just place your mouse right at the very link you want to open
then hit ctrl+enter
links opens in new tab imediately

to disable the right click completely just
type the following into the URL bar of your browser:
javascript:void(document.oncontextmenu=null)

or do this

Hold the right mouse button, hit Enter to close the dialog box, and then release the right mouse button.




zealous for perfection

Offline ebenzunlimited

  • Lead Admin
  • *****
Re: How to to disable right click using javascript?
« Reply #2 on: July 11, 2012, 12:41:24 PM »


Hahahaha... Nice counta post :-)
Insane I Lived♥ Sane I Died♥<img src='http://i253.photobucket.com/albums/hh74/reallytired2/family%20pictures/buckeye%20stuff/clap.gif' />

Online obasimiracle

  • Support Expert
  • *****
Re: How to to disable right click using javascript?
« Reply #3 on: July 11, 2012, 02:38:56 PM »
yeah they are both useful though
Wisdom pays! Be wise!

Offline DE_Light

  • Lead Admin
  • *****
Re: How to to disable right click using javascript?
« Reply #4 on: October 28, 2012, 03:05:52 PM »
Gud one...


 


Inside: 3P Techies Blog

Newest Techies

Get Updates


Sign up to get latest updates delivered to your inbox. No Spam, We Promise!

Get Hosting!

a Faster web hosting service
 

Copyright © 3rd Planet Techies. All rights Reserved.

Top || Mobile ||Advertise || Contact Us || Privacy