3P Techies Forum

Tech Support & Sciences => Design & Development => Topic started by: ebenzunlimited on May 24, 2012, 10:26:51 PM

Title: How to to disable right click using javascript?
Post by: ebenzunlimited on May 24, 2012, 10:26:51 PM
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
Title: How to open links in new tab for sites whose right click is disabled
Post by: zeal 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.




Title: Re: How to to disable right click using javascript?
Post by: ebenzunlimited on July 11, 2012, 12:41:24 PM


Hahahaha... Nice counta post :-)
Title: Re: How to to disable right click using javascript?
Post by: obasimiracle on July 11, 2012, 02:38:56 PM
yeah they are both useful though
Title: Re: How to to disable right click using javascript?
Post by: DE_Light on October 28, 2012, 03:05:52 PM
Gud one...

SimplePortal 2.3.7 © 2008-2020, SimplePortal