Vancouver Web Consultants

November 9, 2009

Triggering File Downloads with jQuery

Filed under: Tutorials, jQuery — Tags: , , , — Nelson @ 11:56 am

jQuery Download CSV

I previously posted this method for Mootools, and now here it is for jQuery.

Clients often ask to have a sorted list exportable via a link to a CSV file that they can open in Excel or whatever spreadsheet software they use. I could find two jQuery plugins for exporting table data to Excel, but I wasn’t comfortable with their reliance on producing popups (that could easily be blocked), or sending data as a querystring to a javascript function that sorts and formats the CSV. Here is a simple, plugin free way of asynchronously generating a .csv file using jQuery and PHP.

(more…)

Powered by WordPress