views:

81

answers:

2

Is there a way to add custom fields to the built in browser context menu using Javascript?

I know flash/actionscript can do this, how are they doing it? Example: right click on http://josephjewell.com and see the custom context menu.

Is this possible with pure javascript or do you have to use flash?

Note, I'm looking for adding to the built in browser context menu, not using custom javascript popups to mimic them.

+1  A: 

Is this possible with pure javascript or do you have to use flash?

As far as I know, to customize the browser menu, registry keys are are created in the registry there by adding more to browser context menu. Flash can create keys in the registry.

On the other hand, browsers such as Mozilla Firefox have their browser-specific API allowing you to customize the context menu as you have seen with many addons out there.

So, you can not do that with pure javascript.

Sarfraz
+1  A: 

Is this possible with pure javascript

No.

do you have to use flash?

Well, you can use Flash, but then you're not adding to the browser menu, you're replacing it completely with Flash's one. So this doesn't get you much that the scripted ersatz-menu doesn't (really only that you get the proper OS theme for menus by default).

In any case even JS ersatz-menus are not reliable, as not all browsers will always let you remove the browser default menu. It is best not to rely on scripting right-click menus.

bobince