PDA

View Full Version : Fire Fox, right click disable


bartainer
04-13-2005, 08:40 PM
Hello;

I'm new to this forum, but I can see already that I'll learn a lot about web design.

When creating a web site for a client, I have inserted code to disable right click (not my choice). However, this code does not work with FF. Is there any way around this? If so, how?

Thanks.

kate
04-14-2005, 09:02 AM
Hya,
Disable right click won't make any difference at all if they want the file its theirs by default as any web site just ends up in their cache.

Here is one I found from a firefox tutorial site, please remember to leave in the credit as this can disable the script if its taken out!

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com ('http://www.dynamicdrive.com')

var message=”©2004 SDPPM. All Rights Reserved. Right Click Disabled.”;

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function(”alert(message);return false”)

// –>

Fortunately, you can still /view/Page Source to see this.

Thanks for the awesome plugin.

By michael on 04.04.05 11:05 am

http://roachfiend.com/archives/2005/03/03/allow-right-click/ ('http://roachfiend.com/archives/2005/03/03/allow-right-click/')

Good luck!

:D

Jim_Shady
04-14-2005, 09:04 AM
Do the clients use FireFox? Or just IE?

You could just tell them that you've done it and hope that they don't check it in different browsers! :P

Jim Shady.

kate
04-14-2005, 09:10 AM
Hya,

But all web pages must and should be checked in all browsers - surely!

You could just tell them that you've done it and hope that they don't check it in different browsers!

And what happpens when they realise they could sue the creator..lmaoooo



:)