CGI is a gateway not a method of controlling browser functions. You will need to use code within the page to control the right click.
All a server side script can do for you is return some html with instructions on what to do with the right mouse click, you might as well code it into the document.
What are you trying to do stop people taking pics off the right click ? I wouldn't bother, put the right click to better use.
If you still want CGI, you could put this script on a blank page and use CGI to call the script, so that if you ever want to change the script you only need to change it once. And it would in effect change across your entire site.
Of course, you could do the same thing without CGI as well.
Originally posted by spider1: Anyone knows where can i find cgi script to disable right mouse click...no java scripts
thanks
Try this, this will disable EVERY FUNCTION associated with the right lick.
< !--Begin Cut-->
script
if (window.Event) // Only Netscape will have the CAPITAL E.
document.captureEvents(Event.MOUSEUP); // catch the mouse up event
function nocontextmenu() // this function only applies to IE4, ignored otherwise.
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
function norightclick(e) // This function is used by all others
{
if (window.Event) // again, IE or NAV?
{
if (e.which == 2 || e.which == 3)
return false;
}
else
if (event.button == 2 || event.button == 3)
{
event.cancelBubble = true
event.returnValue = false;
return false;
}
}
document.oncontextmenu = nocontextmenu; // for IE5+
document.onmousedown = norightclick; // for all others
/script
< !--End Cut-->
That is to be placed in you after your body tag.
Hope that helps. You will also have to add the "<" and the ">" arround the "script". I didn't know any other way to place the code in this post.
- Expo
[This message has been edited by Expo (edited 05-04-2001).]
[This message has been edited by Expo (edited 05-04-2001).]
<a href="http://ctc.amateurpages.com/cgi-bin/ctc/signup.cgi?12955632">Webmasters Earn .06/Click No Ratios Ever.</a><br>
The Best Per Click Program Available
Comment