Not sure which browsers you tested, but according to MSDN onclick fires "when the user presses the left button . Ie, by definition, this does not happen for right (or middle) clicks. Given that on MSDN you can expect IE to behave this way no matter what other browsers do.
(Onclick also works for some things other than the mouse, for example, to change certain form elements using the keyboard, etc.)
I know jQuery is trying to normalize the behavior of browsers, but if the browser does not fire the event at all ...
There is at least one jQuery plugin that I know of that implements right-click: http://abeautifulsite.net/blog/2008/05/jquery-right-click-plugin/ (I have not used it, but it looks good, except that it notes that Opera does not support it).
source share