aspose file tools
The moose likes HTML, CSS and JavaScript and the fly likes Right Click Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 1318

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..
[Linkedin] How To Ask Questions On JavaRanch My OpenSource
Eric Pascarello
author
Rancher

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

Eric
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Right Click
 
Similar Threads
EJB notes by Murali
XML parser
menu o rightclick of a link
disable right click for attachment files
The swing puzzle