How to disable the "Right Click" function of the mouse in web page?
How to disable the "Right Click" function of the mouse in web page?
Using Javascript? Any suggestion code?
Re: How to disable the "Right Click" function of the mouse in web page?
"shatin88" <shatin88@yahoo.com> wrote:
>
>How to disable the "Right Click" function of the mouse in web page?
>Using Javascript? Any suggestion code?
I dug this code up a couple of days ago. Hope it helps.
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
Re: How to disable the "Right Click" function of the mouse in web page?
Your code is work!! Thks a lot!!
"sodajerk" <whatsamattau@bigfoot.com> wrote:
>
>"shatin88" <shatin88@yahoo.com> wrote:
>>
>>How to disable the "Right Click" function of the mouse in web page?
>>Using Javascript? Any suggestion code?
>
>I dug this code up a couple of days ago. Hope it helps.
>
>document.oncontextmenu = function(){return false}
>if(document.layers) {
> window.captureEvents(Event.MOUSEDOWN);
> window.onmousedown = function(e){
> if(e.target==document)return false;
> }
>}
>else {
> document.onmousedown = function(){return false}
>}