I am planning on making a menu on my website that is visible when a user right clicks his/her mouse (similar to a standard windows menu). I basically have just put a table inside a div and used the onMousedown and event.button commands to launch the menu. However using this method also shows the standard windows menu as well as my custom menu upon right clicking. Is there a way to make sure the windows menu does not launch but mine does when a user right clicks?
Also I was thinking of having one of the options on the menu be a disable option so the user could turn of the custom menu if he/she does not want it the next time they right click. How would I go about doing this?
run this once in your code (not each time a user right-clicks, that is uneccessary)
document.oncontextmenu = new Function("return false")
you could also try returning false from your onmousedown handler since the above will proabbly only work in IE