As part of the output of my page, I include a CSV-formatted version of the data table in the text area so that the user can easily copy / paste the CSV export into their table.
I would like you to have a button, when clicked, the Save-as dialog is called, which will load the CSV content already present in the text box on the page.
The goal is to avoid another trip to the database in order to get the CSV export when it is already on the page, providing the user with a shortcut around creating a new file and pasting the copied CSV.
Is it possible?
javascript browser download dialog save-as
Ian
source share