Yes, I know it's frowned upon. Yes, I know the world is safer if neophyte coders aren't allowed these atrocities. And yes, I know it won't work in some browsers. But I still want to do it. I've got some code that works great onclick. However, it's set up to change an input box's background color, so running it onclick is not going to work. I can do it on control click, but eventually I'll be adding other right click options to the app, so would like to consolidate them all under one roof so-to-speak. Can someone please post or point me to a snippet that will check for a right click and disable the browser's right click menu if possible? Thanks, James
I found out this nice piece of code which works for ie http://javascript.internet.com/page-details/right-click-menu.html it disables the usual right click and gives a different set of menus
Thanks! That had the oncontextmenu stuff I was missing. Everything's running great now! Here's what I'm using it for (it's actually going into a bigger app, but that's the test file I used). Right click on any of the input boxes labelled "name" and you can change it's background color. It's for this, so people can sort the counters more easily.
Thanks, although most of the color picker is someone else's work. I just changed the color array and told it to work on the background color of the target instead of changing the text in a hidden input box like the original did.