-
September 12th, 2003, 05:38 PM
#1
Banned
Disabling right mouse button
Hello, i was on this site and i tried to copy a picture, so as i could put it as my desktop picture.
And it came up with this icon saying that i could not do that as it had been dissabled.
And seeing as i am currently building my first web page
I was wondering if anyone knew of the code for this action........?
or a website were i could copy the code into my website's source code??
Cheers and thanks
-
September 12th, 2003, 05:46 PM
#2
You might also want to check out the GreekGoddess tut on protecting yourself from image theft.
HERE
Cheers:
-
September 12th, 2003, 05:48 PM
#3
function disable_right_click(e) {
var browser = navigator.appName.substring ( 0, 9 );
var event_number = 0;
if (browser=="Microsoft")
event_number = event.button;
else
event_number = e.which;
if ( event_number==2 || event_number==3 || event_number==4) {
alert ("Right/middle mousebutton is disabled");
return (false);
}
return (true);
}
function check_mousekey () {
var mouse_key = 93;
var keycode = event.keyCode;
if ( keycode == mouse_key )
alert ( "Mouse Key Is Disabled" );
}
function trap_page_mouse_key_events () {
var browser = navigator.appName.substring ( 0, 9 );
document.onmousedown = disable_right_click;
if ( browser == "Microsoft" )
document.onkeydown = check_mousekey;
else
document.captureEvents( Event.MOUSEDOWN );
}
I cut and pasted this from a web sit I know that does not allow right mouse clicks.
I dont know how accurate it is or even if it works, it could be a load of bollocks for all i know, but it might help you.
-
September 12th, 2003, 05:49 PM
#4
Banned
Thanks i will check it out........
-
September 12th, 2003, 05:55 PM
#5
-
September 12th, 2003, 06:08 PM
#6
if you really want to disable your right mouse button, then do the following:
a) go to a computer store and buy a mouse that is made by Apple Computers
b) go home, unplug your mouse and plug in your new Apple mouse
c) enjoy
hehe
Support your right to arm bears.
^^This was the first video game which i played on an old win3.1 box
-
September 12th, 2003, 06:08 PM
#7
Banned
nope it didn't work.
But thankyou very much anyhow NOKIA, i c a positive AO point coming your way.
And DJM there's also one for you.
So thankyou both
-
September 12th, 2003, 06:30 PM
#8
Junior Member
y dont you try http://javascript.internet.com, http://www.freewarejava.com or http://www.javascriptkit.com these all give planty of "free" copy-paste javascripts you can find all what you dream of.
enjoy
-
September 12th, 2003, 06:58 PM
#9
Banned
Thanks DION i will try em.
(----special------Delivery-----------)
(------oh--------my------it's-------a--------positive------AO--------point)
-
September 13th, 2003, 04:26 AM
#10
You like to fiddle with positive APS huh
Ok - This one doesnt give you a prompt when you right click and still works when javascript is disabled
<body oncontextmenu="return false" ondragstart="return false" onselectstart="return false" scroll="yes">
I put it in the body section.
Hf
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|