| | How do you disable right clicking? I have no javascript knowledge, so can someone give me the full code? Thanks. |
|
CODE <script language=JavaScript> <!-- var message="Function Disabled!"; function rclickIE(){ if (event.button==2){ alert(message); return false; } } function rclickNS(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert(message); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=rclickNS; } else if (document.all&&!document.getElementById){ document.onmousedown=rclickIE; } document.oncontextmenu=new Function("alert(message);return false") // --> </script> Change the line that says var message="Function Disabled"; to contain your message. e.g. var message="You are not stealing my stuff"; Hope that helps.
No java needed.. welli think not.
CODE <body onclick="return false"> might stop peopel from right clicking. Simple- no annoying popups. - not rightclicking
There is really no effective way to hide source code. Disabling right click is a very old method of an attempt to hide source code or protect images and alot of people now know to get around that these days. On apple computers this is completely useless because they have no right click button.
Let's put it this way: the stuff I'm concerned about wouldn't be worth a workaround.
Worth a work around? All you have to do is click the "View" menu, then click "Source". No code can stop someone from doing that. That could be considered even easier that right click >view source
.................................................. .................................................. .................................................. .................................................. .................................................. .................................................. .................................................. ..................................................
Recent Queries:-
Keywords : disable, clicking
Disable the second until first is selected (2) Allright so heres the deal.. Im trying to make a 3 teir dropdown Sort, Order, User both will be (2) Basically, I want that a message box pops up when clicking on a specific link. The message box will and make its icon still have colors? (0) I'm making minesweeper so I have this big matrix of JButtons. I want to have it so that when you Looking for disable, clicking
|
|
![]() How Do You Disable Right Clicking? |
| ADD REPLY / Got an Opinion! | a humble request :-) | RAPID SEARCH! | Free Hosting | [X] |
|
Express your Opinions, Thoughts or Contribute your information that might help someone here. Ask your Doubts & Queries to get answers.. "Together, We enlight each other!" |
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP. | 500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE |
|