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
1,334 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
2 Comments
 
LVL 5

Accepted Solution

by:
Alex-w474 earned 500 total points
Comment Utility
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
Comment Utility
Thats what I'm gathering as I search.  Thanks.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now