View Full Version : ..no right click..


equestryder
03-20-2003, 08:16 PM
Can anyone give me the code in CSS for no right clicking? That would be most helpful. Thank you!

Cagez
03-20-2003, 08:56 PM
I don't think its CSS, it JS
http://javascript.internet.com/page-details/no-right-click.html

equestryder
03-21-2003, 06:18 PM
*sigh* anyone have the no right click CSS code?

epolady
03-21-2003, 06:20 PM
No right clicking is a javascript function and in most cases doesn't work.

equestryder
03-21-2003, 11:17 PM
...im on crack or something. because i've seen the css one before. oh well.

MaGiCSuN
03-22-2003, 05:06 PM
put this between your <head> and </head> tag:

<SCRIPT LANGUAGE="JavaScript1.1">

<!-- Begin
function stopthief(ie) { var warning = "Right clicking this page is not allowed.";
if (navigator.appName == 'Netscape' && ie.which == 3) {
alert(warning);
return false;
}
else
if (navigator.appName == 'Microsoft Internet Explorer' &&
event.button==2) {
alert(warning);
return false;
}
return true;
}
document.onmousedown = stopthief;
// End -->
</SCRIPT>



this is no css, this is still javascript. It isn't possible in CSS but you do put this between the <head> and </head> section and it also is a <style> code so maybe you where thinking it was css :)

Love,
Mirna

equestryder
03-22-2003, 07:31 PM
Thank you... but it still doesn't work. I need to put it on a page where the word "Script" is banned. So the javascript one doesnt work because it turns out like javabbbbb. If you know a way I could unblock a word on my page that'd be great

troubled_1ne
04-13-2003, 08:43 AM
okay i dont know if this is still helpfull but i think the code you are looking for is
<BODYOnContextMenu="return false">

Alcy
04-13-2003, 06:01 PM
^ That only works in IE, netscape users can still right click to their hearts content ;)

Xiphias
04-13-2003, 06:53 PM
like we have stated, right click scripts are featured by JS. They can't be done with CSS... what is your page address? how are you blocking the word 'script'?

equestryder
04-13-2003, 10:12 PM
i found a no right click script that works.