Hi,
Using IE5+, I am attempting to disable the left mouse button across the whole page.
I thought that having the code below would work. I know that the function is called when I left click and the onMouseDown event is raised. But, if I click on a button or element of the page that has an onClick event, the mouse press still occurs. Is there a way that I can intercept the onMouseDown event and cancell it, so that a complete click never occurs?
document.onMouseDown = myFunction();
myFunction ()
{
if (event.button == 1)
{
event.cancelBubble = true;
event.returnValue = false;
return false;
}
}
Thanks, I am grateful for any ideas!
Draug
Using IE5+, I am attempting to disable the left mouse button across the whole page.
I thought that having the code below would work. I know that the function is called when I left click and the onMouseDown event is raised. But, if I click on a button or element of the page that has an onClick event, the mouse press still occurs. Is there a way that I can intercept the onMouseDown event and cancell it, so that a complete click never occurs?
document.onMouseDown = myFunction();
myFunction ()
{
if (event.button == 1)
{
event.cancelBubble = true;
event.returnValue = false;
return false;
}
}
Thanks, I am grateful for any ideas!
Draug