Alex Rivera | Logout

Open the Save Image dialog using jQuery/Javascript?

Asked 2008-12-30T03:44:39.317
11

When a user clicks on an image on a web page, I'd like to trigger the browser's Save Image dialog and to let the user save the image on their hard drive. Is there a cross-browser way to do this with jQuery/Javascript?

Edit
Report

1 Answer

2

The only thing that comes to my mind is the document.execCommand("SaveAs") of Internet Explorer, you can open a window or use a hidden iframe with the url of your image, and then call it...

Check (with IE of course) this example I've done.

answered 2008-12-30T04:17:24.820

Your Answer