PDA

View Full Version : Creating clasic windows context menu in javascript


gregoryM
12-18-2004, 03:15 PM
This script is identical to windows context menu but working in web browser.

It is too long to type it here, sp please see source code and demo at:
http://www.gregorym.net/products/contextmenu/iframe.asp

Thanks

joh6nn
12-18-2004, 09:10 PM
not working for me in FF 1.0. the JS console says you're most likely missing a ( somewhere.

gregoryM
12-18-2004, 09:39 PM
As mentioned in demo script page it works in IE5+ browser.

Thanks

Basscyst
12-18-2004, 10:49 PM
It's cool I guess, but I think it would be more useful labeled as a regular navigation menu or something. I need the context menu in it's default form, and so do most other users.

Basscyst

brothercake
12-19-2004, 12:51 AM
I need the context menu in it's default form, and so do most other users.
Absolutely ... as attractive as it may seem, replacing the context menu is a major no-no

codegoboom
12-19-2004, 02:02 AM
It's certainly appropriate for an HTA, though I'm partial to OLE popup controls. ;)

mindlessLemming
12-20-2004, 07:24 AM
Let's pretend for a moment that replacing someone's context menu isn't a sin.

Ok, your script (besides being IE only) is missing a crucial piece of functionality. Traditionally, context menus dissappear upon left click outside of the menu's area. Yours doesn't.
If you're going to try and recreate someone's OS environment, please make sure yours follows the expected behaviours of the replaced element.

dniwebdesign
12-20-2004, 10:55 AM
I've noticed that it doesn't completly replace the main menu. When you go over and image and right click you still get the default menu with Save As, etc... Most other menus like this I've seen usually replace the default one throughout the whole page.