# How do I change right-click options in an HTML page?



## ironarmadillo (May 17, 2007)

I'm building a series of web-pages for an internal reference application. What I'd like to do is either change the right-click options when clicking on a jpg image or automatically perform a task when a right-click is made on a jpg image. Either option will work in this particular instance but if I could garner suggestions that would give me a choice I wouldn't mind knowing both ways. Any suggestions only need to work in a Windows 2000 and newer environment.

I'd like to keep the entire application as pure HTML but I'm willing to entertain just about anything that will work. And I'm not afraid to RTFM if someone can point me to the right links/docs. I've been a development-level programmer since '69 and I still work primarily in Assembler in the IBM z/OS mainframe market, but my pc-level programming experience is a bit on the light side. I've done some lightweight HTML work before and I know a smattering of Visual Basic and C. If I need to delve into JavaScript or anything else I'll enjoy the challenge.

TIA


----------



## jaymanson (Mar 18, 2007)

Hi and welcome to TSG 

HTML is only a set of guidelines for what a browser should display on your page and can not be used to change any browser settings or functions - i.e. the context menu - so you will need to use JS to achieve that result.

I'm no JS expert myself, so this link to Dynamic Drive will show you an example of a custom context menu using JS. As for creating an automatic action upon right-click, I've can't think of having seen it done before, but if it's possible, you would be looking at JS again.

Hope this helps get you started 

Jay


----------



## ironarmadillo (May 17, 2007)

Thanks for the link. I think this gets me in the ballpark I'm looking for. I'll know for sure in a couple of days - got a bit of studying/trial-and-error to do to get this customized to my needs.


----------

