Disabling Right Clicking in Html? |
Author: |
Message: |
M73A
Veteran Member
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](avatar.php?uid=34919-11144)
Posts: 3213 Reputation: 37
34 / / ![United Kingdom Flag](images/flags/gb.png)
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 ![:)](images/smilies/msn_happy.gif) .
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? ![:)](images/smilies/msn_happy.gif)
This post was edited on 04-03-2005 at 08:05 PM by M73A.
|
|
04-03-2005 07:57 PM |
|
![](images/pixel.gif) |
Dempsey
Scripting Contest Winner
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](http://magicbadger.com/avatar)
http://AdamDempsey.net
Posts: 2395 Reputation: 53
38 / / ![United Kingdom Flag](images/flags/gb.png)
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 |
|
![](images/pixel.gif) |
Anubis
Elite Member
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](avatar.php?uid=26866-5165)
42
Posts: 2681 Reputation: 64
34 / / ![United Kingdom Flag](images/flags/gb.png)
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 |
|
![](images/pixel.gif) |
Ezra
Veteran Member
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](http://tsdme.nl/yass/image/1-1.png)
Forgiveness is between them and God
Posts: 1960 Reputation: 31
37 / / ![The Netherlands Flag](images/flags/nl.png)
Joined: Mar 2003
|
RE: Disabling Right Clicking in Html?
That code really has no use ![:P](images/smilies/msn_tongue.gif) , 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 ![:P](images/smilies/msn_tongue.gif)
|
|
04-03-2005 08:26 PM |
|
![](images/pixel.gif) |
Anubis
Elite Member
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](avatar.php?uid=26866-5165)
42
Posts: 2681 Reputation: 64
34 / / ![United Kingdom Flag](images/flags/gb.png)
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 ![:P](images/smilies/msn_tongue.gif)
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 |
|
![](images/pixel.gif) |
M73A
Veteran Member
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](avatar.php?uid=34919-11144)
Posts: 3213 Reputation: 37
34 / / ![United Kingdom Flag](images/flags/gb.png)
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 |
|
![](images/pixel.gif) |
albert
Veteran Member
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](images/avatars/clear_avatar.gif)
Posts: 2246 Reputation: 42
– / / ![Lebanon Flag](images/flags/lb.png)
Joined: Feb 2005
|
|
04-03-2005 09:07 PM |
|
![](images/pixel.gif) |
lizard.boy
Veteran Member
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](avatar.php?uid=8700-3903)
Posts: 1708 Reputation: 24
34 / / ![Canada Flag](images/flags/ca.png)
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 |
|
![](images/pixel.gif) |
linx05
Senior Member
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](avatar.php?uid=5297-3138)
Charlie!!!
Posts: 969 Reputation: 25
38 / / ![Australia Flag](images/flags/au.png)
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 |
|
![](images/pixel.gif) |
Pipish
Senior Member
![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif) ![*](images/star.gif)
![Avatar](avatar.php?uid=15203-5173)
not really active anymore.
Posts: 914 Reputation: 21
32 / / ![Australia Flag](images/flags/au.png)
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 ![:P](images/smilies/msn_tongue.gif) unless your protecting something :?
|
|
04-04-2005 09:26 AM |
|
![](images/pixel.gif) |
Pages: (4):
« First
«
1
[ 2 ]
3
4
»
Last »
|
|