vann_d
asked on
Force Download of .csv file via JS or any other means
I have searched this site and I have found many similar answers to my question: How can you force a file to be downloaded instead of opening in the browser? This is exactly what I want to happen. I have a button on a webpage that points to a csv file. When the user clicks on it, I want the browser to automatically prompt for save/download instead of displaying the file.
Current Problems (limitations):
1) The filename is created beyond my control. It will always be *.csv.
2) I am trying to bypass the right-click save or file save as options.
I read somewhere that there was JavaScript that could force a download, but I can't find that code. Any help is greatly appreciated.
Thanks
Current Problems (limitations):
1) The filename is created beyond my control. It will always be *.csv.
2) I am trying to bypass the right-click save or file save as options.
I read somewhere that there was JavaScript that could force a download, but I can't find that code. Any help is greatly appreciated.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER