Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi there!

is there any way to get which picture is right clicked on page with javascript? But there's no onmousedown, onclick or any events.
Just like IE context menu "Show Pictures" or "Save As Image".
Posted

1 solution

You'll want to write an event handler and detect which button is clicked.

You can go the plugin route (if you want a menu), or just write your own handler. Using a library like jQuery is a big help.

Google turned up a sample implementation
here[^].

Cheers.
 
Share this answer
 
Comments
Sandeep Mewara 18-Aug-10 12:21pm    
Comment from OP:
it won't help
Refering this article; They can get text but not image.
http://www.codeproject.com/KB/menus/IE_Context_Menu_Installer.aspx
TheyCallMeMrJames 18-Aug-10 12:25pm    
You can write the live handler for the mouse click for any DOM object. The link provided works for javascript. From the link you suggested, you're looking for something that integrates into the browser, not the page, no?
Sosyopat 18-Aug-10 13:21pm    
yes. i'm looking something for integrate the browser. trying to get url of image.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900