Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Javascript - Simulate 'right click=>save as' to save an image on a page to a place on user's computer.

Posted on 2008-06-13
2
Medium Priority
?
1,411 Views
Last Modified: 2013-11-07
This is a dual question actually.  My purpose is to save all of the images on a page to a specific directory on the user's computer upon request.  I know I have seen in web pages, the ability to click on a button that says 'browse' for instance, and a little Windows explorer window pops up allowing you to navigate to a specific destination on your hard drive.  That is usually to find a file to upload however.  I'm wondering if I can do such a thing to select a directory to save a file to and if it can be done with javascript or what is used to do it.  If not in javascript, then in ASP.NET?  The application is actually an ASP.NET application.  Secondly, I'm wondering if it is possible to use javascript to simulate a left click on an image and saving it to the above mentioned (browsed to) location.  I would like to be able to do all this with just a browse to field and a button to execute the operation.  The user should not need to right click and save.  Once again, I have ASP.NET and javascript to use.  Any suggestions?
0
Comment
Question by:josephdaviskcrm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
Alex-w474 earned 2000 total points
ID: 21782920
You cannot simulate this behavior because of security considerations.
You can only redirect user's browser to server script (or file) that returns archive with all images. In this case browser will handle the file and will show the "Save As..." dialog for user (for archives) or just show the image (if you just redirects to image.)
0
 

Author Closing Comment

by:josephdaviskcrm
ID: 31467068
Thats what I'm gathering as I search.  Thanks.
0

Featured Post

Build and deliver software with DevOps

A digital transformation requires faster time to market, shorter software development lifecycles, and the ability to adapt rapidly to changing customer demands. DevOps provides the solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question