Solved

Javascript to save image

Posted on 2014-02-17
3
280 Views
Last Modified: 2014-03-14
Dear Experts,

I have a problem to save images on web page to specified local path using javascript.
It seems that the browser do not allow javascript to to that because of security or virus protection...

Do you have any solution for this? Please help!

Regards.
0
Comment
Question by:FSOFT-SA
  • 2
3 Comments
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 39864237
No, you're right.  The browsers do not allow javascript to save files locally because of security restrictions.  If a web page could save files to your computer without your permission, then we all would be infested with viruses all the time.  If you find a way to do this with your web page javascript, you will shortly find your web site blocked by the anti-virus programs.
0
 

Author Comment

by:FSOFT-SA
ID: 39887977
So, It means there's no solution for this.
Or at least, we must ask permission from user. After that, we can save the file to the specified path on local. User doesn't need to specify the path to save image.

Please help.
0
 
LVL 83

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 500 total points
ID: 39887996
No, that's not true either.  The user can right-click on an image and save it anywhere they want.  You can't force them to download it and you can not specify the path though you could suggest it on the page where the image is.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
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…

776 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