What I am trying to do, is to disable the context menu ( which seems fairly easy), but enable it selectively only when the user right clicks on a link, in which case I want to give the user the option to open the link in a pop up window which will have the address bar disabled.
Target Browsers: IE and NN, there is a fair bit of control over the browsers to be used.
Oh..and because I will be adding it to a large no. of existing pages, I cant use onClick events in the actual links, but need something like a document level event handler.
Is this even possible? If not, I wont waste any more time on it. If it is, How do I go about recoginizing that the right click happened over a link, and what the HREF attribute for that link is?
The code I am using to disable the context menu is -
This is basically a stop-gap measure to force an average user to use the application through the links provided and stop them from entering possibly invalid values directly through the address bar.
Thanks Eric. That looks very interesting, and for a change, the difference in code for IE and NN is somewhat makeing sense . I will try to work on that.
The future is here. It's just not evenly distributed yet. - William Gibson
Sonny GillLinkedIn Tweets