By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,984 Members | 1,045 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,984 IT Pros & Developers. It's quick & easy.

Download button

nomad
Expert 100+
P: 664
Hello Everyone:

I'm not sure if this is the right area for this topic.
Anyway I'm looking to see if anyone knows how to make a .js file that will allow someone to click on a download button and they get that file or image to their computer.
ie to their desktop

Thanks
damon
Mar 21 '14 #1
Share this Question
Share on Google+
3 Replies


Dormilich
Expert Mod 5K+
P: 8,639
thatís simple. use a link (e.g. <a href="/path/to/file" class="button">file</a>) and style it that it looks like a button.
Mar 21 '14 #2

nomad
Expert 100+
P: 664
Not what I'm looking for Dormilich. It needs to download to their desktop sorry about that one.
Thanks anyway Dormilich
Mar 21 '14 #3

Dormilich
Expert Mod 5K+
P: 8,639
you can’t choose the download location. that’s the responsibility of the user (mostly defaulting to the download folder). besides that, when you click on the link and the file is set for download (e.g. because you set the appropriate headers) the file will happily start downloading.
Mar 21 '14 #4

Post your reply

Sign in to post your reply or Sign up for a free account.