473,388 Members | 1,499 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Download button

nomad
664 Expert 512MB
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
3 1348
Dormilich
8,658 Expert Mod 8TB
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
664 Expert 512MB
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
8,658 Expert Mod 8TB
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

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

Similar topics

37
by: alan b | last post by:
Is it possible to create a button on page in HTML? When clicked, a list of files is displayed for selection for downloading to home uers'pcs? alan
0
by: bill | last post by:
Hi All, I have built an application that allows a user to download a file from the server. I would like to come up with a solution that works with all html standard compliant browsers in...
1
by: M.Babli | last post by:
Hello everyone, I do not know much about javascript, so please excuse me if my question is not clear.: If I build a string in Javascript string =...
3
by: pd | last post by:
guys, in my web app, i have a simple download button and a href which points to a file on my server, when the user clicks on the button or the link, the file should simply be downloaded to the...
1
by: cnusangam16 | last post by:
HI I want to save a file when clicked on the download button .please help . thanks
6
by: vstud70 | last post by:
Dear friends, I have a website that sells software. In my download page I have a "download" button that once the user clicks it open the windows wizard to /download/save/cancel the software. So...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.