Is it possible to detect using JavaScript when the user clicks the back/forward buttons that are the side of your mouse ? These are known as XButtons as far as I know, in .net at least. This is for a locally installed app so I don't need cross browser support, just something that works in IE.
Asked
Active
Viewed 1,209 times
5
-
@Greg Maybe I'm missing something, but how would onkeydown help in catching a (type of) mouse click ? – Michael Low Jul 20 '11 at 04:51
-
Ignore that last one, sorry, its late on the east cost +1 for the question though, its a good one – Greg Guida Jul 20 '11 at 04:55
2 Answers
3
This cannot be done. The most sophisticated mouse click events you will get is left and right.
<script type="text/javascript" language="javascript">
function testMouseClick()
{
if(event.button == 1)
{
alert("Left Mouse Click is Pressed..");
}
if(event.button == 2)
{
alert("Right Mouse Click is Pressed..");
}
}
</script><

Michael Low
- 24,276
- 16
- 82
- 119

JustBeingHelpful
- 18,332
- 38
- 160
- 245
1
No, don't think so, by the time it gets to the browser it's been translated into whatever action the button is bound to

Keith Nicholas
- 43,549
- 15
- 93
- 156