Friday, February 6, 2009

DISABLE RIGHT CLICK ON WEBPAGE

Most of the developers think that by disabling right click on webpage they have prevented others to view their source.But there are many ways to view the source of the page.
However,even by doing that they are unable to disable right click completely.
There are two ways to view the context menu(nothing but menu displayed on webpage)
1.mouse right click
2.context menu key on keyboard

Now to disable right click in all the ways..
just use --->
oncontextmenu="return false;" attribute in body tag .

2 comments:

  1. Sir Pradeep..
    I think (not sure) ,i have seen this post somewhere else!!

    ReplyDelete
  2. Yes man u r right....Its not me written this code,neither the man from whom's blog i have copied .Its jus the matter of copying and using wherever u needed.I think I should have written a comment saying "Everything posted is copied from somewhere else...The purpose of this blog is to jus use it as reference.I really don't have any responsibility for further procedings".
    Njoy

    ReplyDelete