Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

right-click rename and download image 1

Status
Not open for further replies.

gschmeus

Programmer
Sep 18, 2001
8
0
0
DE
Problem: Add an item "Download image" to the context menu of IE5.5 so when the mouse is over an image the user can store it in a certain directory (for further processing). The image has to be renamed.

I managed to extend the context menu but can find no way to store the image. Maybe the file system object is of use. Can please somebody help me?
 
small workaround: (not my own :))

function saveImageAs (imgOrURL) {
if (typeof imgOrURL == 'object')
imgOrURL = imgOrURL.src;
window.win = open (imgOrURL);
setTimeout('win.document.execCommand("SaveAs")', 500);
}

..

<A HREF=&quot;javascript: void (0)&quot;
ONCLICK=&quot;saveImageAs(document.images.anImage); return false&quot;
>save image</A>
<IMG NAME=&quot;anImage&quot; SRC=&quot;whatever.gif&quot;>
Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top