Disabling Right Clicking in Html? |
Author: |
Message: |
M73A
Veteran Member
Posts: 3213 Reputation: 37
34 / /
Joined: Jul 2004
|
O.P. RE: Disabling Right Clicking in Html?
quote: Originally posted by Dempsey
btw it is possible using just html, you use the following code in the body tagcode: oncontextmenu="return false"
when i do that i just get the words 'oncontextmenu="return false"' show up in the background of the webage.
the javascript works .
is there a way to get it to work in firefox? the message saying function disabled appears but the right click menu just appers once u click 'OK', lol
theres
quote: Originally posted by code
function clickNS4{
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
which id say is netscape? and theres another for IE AFAIK...whats the code for mozilla firefox?
This post was edited on 04-03-2005 at 08:05 PM by M73A.
|
|
04-03-2005 07:57 PM |
|
|
Dempsey
Scripting Contest Winner
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / /
Joined: Jul 2003
|
RE: Disabling Right Clicking in Html?
did you do it like code: <body oncontextmenu="return false">
or code: <body>oncontextmenu="return false"
It sounds like you did it the second way, but it should be the first, in the body tag
|
|
04-03-2005 08:12 PM |
|
|
Anubis
Elite Member
42
Posts: 2681 Reputation: 64
34 / /
Joined: Oct 2003
|
RE: Disabling Right Clicking in Html?
quote: Originally posted by may73alliance
which id say is netscape? and theres another for IE AFAIK...whats the code for mozilla firefox?
The code I gave you works in Mozilla Firefox, most likely because it uses the Netscape engine...but I haven't found a browser that code didn't support.
|
|
04-03-2005 08:15 PM |
|
|
Ezra
Veteran Member
Forgiveness is between them and God
Posts: 1960 Reputation: 31
37 / /
Joined: Mar 2003
|
RE: Disabling Right Clicking in Html?
That code really has no use , If you keep the right mouse button pressed and press ok, it still shows the menu, and the same buttons are also in the View button next to Edit
|
|
04-03-2005 08:26 PM |
|
|
Anubis
Elite Member
42
Posts: 2681 Reputation: 64
34 / /
Joined: Oct 2003
|
RE: RE: Disabling Right Clicking in Html?
quote: Originally posted by Ezra
That code really has no use, If you keep the right mouse button pressed and press ok, it still shows the menu, and the same buttons are also in the View button next to Edit
It's the same with all disable right click scripts, you can just drag the image to the URL bar and copy it...Anti right clicking is really a dumb idea, tbh.
|
|
04-03-2005 08:32 PM |
|
|
M73A
Veteran Member
Posts: 3213 Reputation: 37
34 / /
Joined: Jul 2004
|
O.P. RE: Disabling Right Clicking in Html?
quote: Originally posted by Dempsey
did you do it likecode: <body oncontextmenu="return false">
or code: <body>oncontextmenu="return false"
It sounds like you did it the second way, but it should be the first, in the body tag
yeah i was using the second one
quote: Originally posted by Anubis
quote: Originally posted by may73alliance
which id say is netscape? and theres another for IE AFAIK...whats the code for mozilla firefox?
The code I gave you works in Mozilla Firefox, most likely because it uses the Netscape engine...but I haven't found a browser that code didn't support.
oh right, just when i previewed the html in firefox i could right click my heart away, lol
|
|
04-03-2005 08:34 PM |
|
|
albert
Veteran Member
Posts: 2246 Reputation: 42
– / /
Joined: Feb 2005
|
|
04-03-2005 09:07 PM |
|
|
lizard.boy
Veteran Member
Posts: 1708 Reputation: 24
34 / /
Joined: Mar 2003
|
RE: Disabling Right Clicking in Html?
bah i hate codes like that.. especially in sites like mess. because the way mess does it you cant center clikc to scroll :/ but then again mess is just fucked with the use of javascript and frames.
|
|
04-03-2005 09:46 PM |
|
|
linx05
Senior Member
Charlie!!!
Posts: 969 Reputation: 25
38 / /
Joined: Feb 2003
Status: Away
|
RE: Disabling Right Clicking in Html?
Meh. I just use the plugin in Maxthon and it disables all forms of the "disable right click" feature.
|
|
04-04-2005 09:20 AM |
|
|
Pipish
Senior Member
not really active anymore.
Posts: 914 Reputation: 21
32 / /
Joined: Apr 2003
|
RE: Disabling Right Clicking in Html?
why would you want to disable it , it makes people feel like they have a mac unless your protecting something :?
|
|
04-04-2005 09:26 AM |
|
|
Pages: (4):
« First
«
1
[ 2 ]
3
4
»
Last »
|
|