View Full Version : No right clicking
TedjeRaggie
09-18-2002, 06:35 PM
Ey There people,
I'm making a site, and I don't want that people "right-click" on my site. Is there some kind of html-code for???
If there is, can someone please send me that code... You can put it here, or mail it to me: tedraggie@hotmail.com
:thumbsup: --> for the one that will help me
Thank you very much
ionsurge
09-18-2002, 07:17 PM
This is it:
<!------------------------------------------------------------------------------->
<script language=JavaScript>
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
</script>
<!------------------------------------------------------------------------------->
Put it into your <head>
Roy Sinclair
09-18-2002, 07:19 PM
More on this than you probably want to know (http://www.codingforums.com/showthread.php?s=&threadid=4437&highlight=right+and+click)
zoobie
09-18-2002, 08:43 PM
Left-handers love those scripts...Totally useless.:rolleyes:
ionsurge
09-19-2002, 11:16 AM
I agree, I had it on my very first site, and people found that due to the fact that they swapped the buttons for their mouse, they couldn't do anything... and were dead, and couldnt navigate unless they swapped the mouse keys.
TedjeRaggie
09-19-2002, 07:29 PM
Well okay, maybe it doesn't block everything. But to me it's important that people won't take my pictures directy, doing "right click - save pic as". And most of the people if they can't right-click they don't know what else to do... so that's my purpose
ionsurge
09-20-2002, 06:38 AM
Trust me, if your site is html, or any other format, apart from .asp, I can get absolutely and literally anything that I want to get from it as I please, be it a picture, or an .swf file, or, sound file a movie.
Disabling right-click is a waste of time.
Unless you use .asp, you are wasting your time.
Sorry.
Zvona
09-20-2002, 09:32 AM
Tedje, please pay attention on following notes :
Post your topic to a correct forum. When there are problems with controlling objects or events, it's definitely a scripting matter.
Use search before posting. CodingForums has the most qualified members and moderators, which has already answered nearly all the questions one can propose.
Kindly,
zoobie
09-20-2002, 11:02 AM
Any 9 year old can also just push the 'print screen' button or drag the pic to the address bar...presto! Like I said..useless.:rolleyes:
ionsurge
09-20-2002, 11:47 AM
File -> Save As, often does the trick too...
applesauce
09-20-2002, 05:21 PM
if you look in the "general web building" category, you'll see right at the top this topic, since it gets asked so much.
mouse
09-20-2002, 07:23 PM
Feel free to submit your site to http://sitesusingnorightclickscripts.com so I can avoid it in future. :p
lacrypta
09-20-2002, 10:15 PM
y don't you put a light watermark somewhere on your images:thumbsup:
TedjeRaggie
09-21-2002, 05:40 PM
I just want to have it, if you wiz-kids still can get my ****, so what doesn't interest me, so get off my back and leave me.....
:mad: :mad: :mad:
ionsurge
09-23-2002, 11:11 AM
Someone is touchy... we are only offering some advice...
tired&lonely
09-24-2002, 03:30 PM
Hey, TedjeRaggie, according to the brilliantly astute (and oh so clever) wiz-kids on this forum, any casual internet user or ANY newbie or, for that matter, even ANY 4 year old tike or senile grandma would know how to save a picture even if their right clicks were disabled... that's because ALL humans are naturally born with mozilla programmed into their brains... weren't you?!!! :eek:
[tongue in cheek]
But, for your non-internet savy users (that is, those born without mozilla in their brain cells), put the following code between your <head> and </head> to disable right-clicking:
<script language="JavaScript">
var message="";
function clickIE() {
if (document.all) {(message);return false;} }
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
</script>
allida77
09-24-2002, 03:59 PM
If it gives TedjeRaggie ease of mind then let him be. I dont see the point of people being rude to a person with 3 posts. If you want to rant there was another post on this with about 5 pages in another category.
ionsurge
09-25-2002, 10:09 AM
By the way, you can also get your html file anyhow, along with absolutely anything that is included in it, if you go to your site, and while it is open, go to explorer or 'File Manager' if you have windows 3.1.
For those who have Windows 95-Me, do the following:
Go to your windows directory, often C:\Windows
In their you would find a folder called Temporary Internet Files
Inside that there are often about four different directories. Within them, you will find everything that you would want to rip off from a web page using .html that tickles your fancy.
For those with Windows XP Pro, or NT (I dont have WinXP Home, so it may be the same as with Win95+), do the following:
Go to (If your drive letter where windows is installed is C:\)
C:\Documents & Settings\User\Local Settings\
Local settings is a hidden folder, so you would have to either show hidden folders from the [Tools->Options] window, and enable it, or copy and paste from the above.
In their you will find the Temporary Internet Files, from which you can also take what you want, and use what you want, including .html files, .gif, .jpg, .swf, .js, etc.
Hehe.... :D
PS: Using [No Select Text] scripts often fail with this too....
Sorry to burst your bubble.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.