I have a PHP app that creates a CSV file which is forced to download using headers. Here\'s the relevant part of the code:
header(\'Content-Type: applicatio
Launch the PHP file which contains the CSV download using:
Download CSV File
or
where the JavaScript function popoutWin
is
/*
* Popout window that self closes for use with downloads
*/
function popoutWin(link){
var popwin = window.open(link);
window.setTimeout(function(){
popwin.close();
}, 500);
}
This will open a window, to display the CSV download prompt and then immediately close the window, leaving only the prompt.