Right Click Disable
-
Hi All, I have to disable right click and backspace key of IE.Can anyone help me in doing this. Thanks...
-
Hi All, I have to disable right click and backspace key of IE.Can anyone help me in doing this. Thanks...
-
It's basically a waste of time. It can be done with javascript (see google), but it's so easy to circumvent, it's not worth the time implementing it.
I got some code but not getting where should I call them??? Following is the code which I got: Code 1: function Disable() { if (event.button == 2) { alert("This action is not possible") } } document.onmousedown=Disable; Code2: var message="foo"; function click(e) { if (document.all) { if (event.button==2||event.button==3) { alert(message); return false; } } if ((document.layers)||(window.navigator.userAgent.toLowerCase().indexOf('gecko ') != -1)) { if (e.which == 3) { alert(message); return false; } } } if ((document.layers)||(window.navigator.userAgent.toLowerCase().indexOf('gecko ') != -1)) { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=click; Code3: var am= "This function is disabled!"; bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" function nrc(e) { if (bNS && e.which > 1) { //alert(am); return false } else if (bIE && (event.button >1)) { //alert(am); return false; } } document.onmousedown = nrc; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (bNS && bV<5) window.onmousedown = nrc; Please help me... Thanks...
-
I got some code but not getting where should I call them??? Following is the code which I got: Code 1: function Disable() { if (event.button == 2) { alert("This action is not possible") } } document.onmousedown=Disable; Code2: var message="foo"; function click(e) { if (document.all) { if (event.button==2||event.button==3) { alert(message); return false; } } if ((document.layers)||(window.navigator.userAgent.toLowerCase().indexOf('gecko ') != -1)) { if (e.which == 3) { alert(message); return false; } } } if ((document.layers)||(window.navigator.userAgent.toLowerCase().indexOf('gecko ') != -1)) { document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=click; Code3: var am= "This function is disabled!"; bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" function nrc(e) { if (bNS && e.which > 1) { //alert(am); return false } else if (bIE && (event.button >1)) { //alert(am); return false; } } document.onmousedown = nrc; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (bNS && bV<5) window.onmousedown = nrc; Please help me... Thanks...
To echo the previous - waste of time. What are you going to do when the user disables Javascript? More to the point, it's immensely annoying when a web developer decides I can't have control of my browser. Find another way to solve whatever problem you have.
-
To echo the previous - waste of time. What are you going to do when the user disables Javascript? More to the point, it's immensely annoying when a web developer decides I can't have control of my browser. Find another way to solve whatever problem you have.
Our Project requirement is that no one should view the source code so I need to disable right click. Please tell me how do I go about it. Thanks...
-
Our Project requirement is that no one should view the source code so I need to disable right click. Please tell me how do I go about it. Thanks...
varshavmane wrote:
Our Project requirement is that no one should view the source code so I need to disable right click.
It's not going to happen. Disabling right click is not going to help. If you want to keep your code hidden, run it on the server. If you pass the code to the client, there will always be a way for them to get access to it. Disabling right click is a waste of time. Or rewrite the whole thing as an ActiveX/Java client.
-
varshavmane wrote:
Our Project requirement is that no one should view the source code so I need to disable right click.
It's not going to happen. Disabling right click is not going to help. If you want to keep your code hidden, run it on the server. If you pass the code to the client, there will always be a way for them to get access to it. Disabling right click is a waste of time. Or rewrite the whole thing as an ActiveX/Java client.
I have remove all the toolbars of IE and now I want that right click should be disable so that no one can get the code via right click or by going to view source. Please help me...
-
I have remove all the toolbars of IE and now I want that right click should be disable so that no one can get the code via right click or by going to view source. Please help me...
-
I have remove all the toolbars of IE and now I want that right click should be disable so that no one can get the code via right click or by going to view source. Please help me...