artacus Posted November 29, 2006 Share Posted November 29, 2006 Ok, I have a php app that can generate a pretty large table. I want: [list][*]The user to be able to download that data as a CSV file.[*]The CSV should be created in Javascript because its already there.[*]The file to be treated as a download by the browser.[/list] I've already written the Javascript to rip the data out of the table and make the CSV data. If I were using PHP for this I would use header content-type and disposition calls to get the browser to do what I want. How do I do that using Javascript? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/28912-exporting-text-for-download/ Share on other sites More sharing options...
fenway Posted December 6, 2006 Share Posted December 6, 2006 It's too late... once you're client-side, you've already served a document with a header. Quote Link to comment https://forums.phpfreaks.com/topic/28912-exporting-text-for-download/#findComment-135993 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.