开发者

Is it possible to capture right click button event over a link in IE?

I'm trying to develop an IE BHO (Add-on) and I'm interested in adding an option to the context menu, but only if the right click occurs over a link.

Is this possible using SpicIE framework?

I've seen that the framework offers options to capture multiple events, but right click button is not on the list.

If this is not possible with SpicIE, I'll be g开发者_StackOverflowlad to listen to any comments on alternative ways to achieve the goal.


You really should not use SpicIE for any production application. Your simplest bet would be to add a Context Menu extension; see http://msdn.microsoft.com/en-us/library/aa753589.aspx for details. Otherwise, you have to override IDocHostUIHandler, and it's an extremely non-trivial exercise.


Yes, it is possible in IE.

I don't know how well it will work with other browsers though, or IE9, which is a lot more standards compliant.

Here you can see an example where they detect the mouse-button clicked with Javascript. The examples should be rather self-explanatory. They also show how to block the mouse-button click event of being triggered.

http://www.rgagnon.com/jsdetails/js-0061.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜