ktam
03-25-2003, 11:28 AM
Is there a way, using javascript, to detect a right mouse click anywhere in your browser?
Thanks in advance.
Thanks in advance.
|
Click to See Complete Forum and Search --> : Right mouse click ktam 03-25-2003, 11:28 AM Is there a way, using javascript, to detect a right mouse click anywhere in your browser? Thanks in advance. Vladdy 03-25-2003, 11:40 AM Yes havik 03-25-2003, 11:46 AM lol, I think Vladdy is trying to say that yes it is possible but for what purpose? The answer you got was the correct one for the question asked. Just to let you know that if you wish to use javascript to disable the right click for protection purposes then it's not fool proof. People can disable JavaScript support in their browser, use a browser which doesn't support JavaScript, or use a browser to link directly to the image that you want to protect. Also the pages and images are normally stored in the user's browser cache (for viewing later whilst offline). Havik ktam 03-25-2003, 12:14 PM Originally posted by havik lol, I think Vladdy is trying to say that yes it is possible but for what purpose? The answer you got was the correct one for the question asked. Just to let you know that if you wish to use javascript to disable the right click for protection purposes then it's not fool proof. People can disable JavaScript support in their browser, use a browser which doesn't support JavaScript, or use a browser to link directly to the image that you want to protect. Also the pages and images are normally stored in the user's browser cache (for viewing later whilst offline). Havik No I wouldn't use client side code for source protection. I'm using it to kick out an alert box that will display a message as part of an interactive information brochure I'm working on. SeGamysa 03-25-2003, 12:52 PM <script language="JavaScript"> function click() { if (event.button==2) { alert("Hi how u doin?"); } } document.onmousedown=click // --> </script> havik 03-25-2003, 12:53 PM Okay, Well it is possible and probably easier to do for IE than for Netscape. Take a look at this page: http://www.xs4all.nl/~ppk/js/events_properties.html I believe it has all your looking for. Havik SeGamysa 03-25-2003, 12:55 PM Originally posted by havik Okay, Well it is possible and probably easier to do for IE than for Netscape. Take a look at this page: http://www.xs4all.nl/~ppk/js/events_properties.html I believe it has all your looking for. Havik lol does alot more then my does..... ktam 03-25-2003, 12:57 PM Originally posted by SeGamysa <script language="JavaScript"> function click() { if (event.button==2) { alert("Hi how u doin?"); } } document.onmousedown=click // --> </script> Thank you muchly:D SeGamysa 03-25-2003, 01:02 PM no prob havik 03-25-2003, 01:21 PM In the spirit of quoting: Originally posted by SeGamysa lol does alot more then my does..... Because your code doesn't work with netscape and displays the alert whenever you click on the page. Using the info on the link I gave you can detect the exact position of the right click, which is what I thought ktam wanted. guess not. Havik ktam 03-25-2003, 01:25 PM Originally posted by havik In the spirit of quoting: Because your code doesn't work with netscape and displays the alert whenever you click on the page. Using the info on the link I gave you can detect the exact position of the right click, which is what I thought ktam wanted. guess not. Havik I just figured that out. Thanks for the heads up! SeGamysa 03-25-2003, 01:32 PM Originally posted by havik In the spirit of quoting: Because your code doesn't work with netscape and displays the alert whenever you click on the page. Using the info on the link I gave you can detect the exact position of the right click, which is what I thought ktam wanted. guess not. Havik no u where right. I forget at times to check my code in netscape and pay for it later when i have to figure out whats wrong with it :o :p havik 03-25-2003, 01:34 PM Yeah, it'd be nice if they both operated the same, make life easier on us. :D Havik webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |