need javascript to disable right-click
i saw this site in the website critique area - http://www.zghy.com.cn/
i've noticed that right-click is disabled without any annoying pop-up saying 'right-click disabled' and you cannot view source.
the best thing is that you cannot even save the page !
i saw this script a few weeks ago searching in the net but i don't know where i saved it.
can anyone please help. i need exactly these scripts (disable right click without any notice + disable view source + disable page saving options).
much thanks ^ PUI
openmind posted this at 08:50 — 26th August 2004.
He has: 945 posts
Joined: Aug 2001
And the point would be?
I was able to view the source quite easily in Mozilla.
If someone want to look at the source, they will and there's little point in trying to stop them. As has been said many times before here, if it's that private, don't put it on the net!
Renegade posted this at 09:26 — 26th August 2004.
He has: 3,022 posts
Joined: Oct 2002
Although someone may hit me for giving you the following code, I wanted to give it to you to show that I was able to view source (to actually get it) by right clicking.
<script event=oncontextmenu for=document>return false;</script>
<script event=onselectstart for=document>return false;</script>
Oh and BTW, I was able to save... and I'm not too sure that is what you are looking either.
openmind posted this at 09:28 — 26th August 2004.
He has: 945 posts
Joined: Aug 2001
**slaps renegade around the head**
Theres the point. Even though the script"tries" to hide the source it can be got round so why waste your time!
KarenArt posted this at 10:38 — 26th August 2004.
She has: 354 posts
Joined: May 2001
As a Mac user, I feel it's my obligation to point out that...
disabling right-clicking and view source doesn't work for us.
Nahh nahh nahh nahh nahh nahh...
Here is a good article for why you might not want to do this http://www.sitepoint.com/article/dont-disable-right-click. They also give you some very good alternatives that you may not have thought of.
gotta finish redesigning my sites so I can show them again.
The purpose of education is... to get more jokes!
openmind posted this at 10:40 — 26th August 2004.
He has: 945 posts
Joined: Aug 2001
Aaaahhh The amazing one fingered operators!!
KarenArt posted this at 10:47 — 26th August 2004.
She has: 354 posts
Joined: May 2001
Yes... but the secret is... which finger do you use...
Dragon of Ice posted this at 15:59 — 26th August 2004.
He has: 578 posts
Joined: Jun 2004
first AND second!
pui posted this at 09:00 — 27th August 2004.
They have: 15 posts
Joined: Aug 2004
flipper - the point would be to study. i am learning html and understand scripts.
Renegade - i use windows explorer. right click, view source and save was off. are the scripts in the head or body ? please pm me
thanks everyone for the replies
Renegade posted this at 09:10 — 27th August 2004.
He has: 3,022 posts
Joined: Oct 2002
I think I found thecode in the
openmind posted this at 09:38 — 27th August 2004.
He has: 945 posts
Joined: Aug 2001
I suppose you could use all four!
Fair enuff.
Dragon of Ice posted this at 15:30 — 27th August 2004.
He has: 578 posts
Joined: Jun 2004
That would be a bit odd... Anyone else use two fingers on a mac mouse?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.