Click to See Complete Forum and Search --> : a newbie: how to disable the default context menu?


raysun
08-25-2003, 09:52 PM
thanks anyone much for help!

I'm just gonna implement context menus for different nodes of my navigation tree for the page, i guess i knew how to popup those different context menus now, but i don't know how to disable the default context menu, i guess it is something like this:

document.onContextMenu = ...;

can someone please tell me what should be the ... ?
thanks a lot!

pyro
08-25-2003, 10:24 PM
return false;

But, you may want to rethink disabling it... Generally speaking, it is a bad idea to mess with the users settings/browser.

AdamBrill
08-25-2003, 11:00 PM
Take a look at the attached script. You should be able to use that to help you...

However, Pyro is right. Think twice before messing with the users menu... ;)

raysun
08-25-2003, 11:08 PM
yeah, i knew it is a bad idea, actually it wasn't my own idea at all, just our client wants it, and I had been suggesting them not to do so, but they said they'd like to have a try, so...

anyway, thanks much guys!