aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Right Click Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Right Click" Watch "Right Click" New topic
Author

Right Click

suganya raj
Greenhorn

Joined: Aug 08, 2007
Posts: 10
Hi,

Can anybody tell me how to disable right click in my site.

Regards,
Suganya

EasyCalculation
Tofocus
asd
Greenhorn

Joined: Jan 24, 2007
Posts: 5
Hi,

Try this ...

<SCRIPT language="JavaScript" event="onmousedown()"
for="document"> DisableRightClick(window.event);

function DisableRightClick(ae_EventRef)
{
var ls_message = "Function Disabled.";
if (ae_EventRef.button == 2)
{
alert(ls_message);
return false;
}
}
</SCRIPT>
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

I asked to the google and it provide me lots of link for that script.

This link is one of them.

hope it helps.


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
FYI: browsers now have the ability to block these no right click scripts.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Right Click