Safari has a tendency to hang when uploading files, and it turns out there’s an easy fix. (more…)
January 10, 2010
November 9, 2009
Triggering File Downloads with jQuery

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.
June 5, 2009
Secure Javascript Form Validation with Mootools
Did I get you with the title? That’s right, it’s not possible to securely validate a form with Javascript. That is, you can’t prevent invalid data from being submitted to the server by using Javascript for validation. We’ve all seen Javascript-based form validation classes (and classes for Javascript libraries like Mootools, which is my favourite, so I’ll be making reference to it here), but it’s all too often not made clear enough to those who might use such classes that javascript validation alone provides no security against invalid data being sent to your back-end processing script and making it into your database.
May 1, 2009
Triggering File Downloads with Mootools
Creating a javascript links that uses AJAX (or, more accurately, an asynchronous http request) to trigger a file download, usually results in disappointment. Headers returned by a PHP script called asynchronously do not trigger a download in the browser.
March 25, 2009
Mootools Fx.Scroll bug with IE6/IE7
You may be having trouble getting Fx.Scroll to scroll to the correct coordinates in Microsoft browsers. Apparently Mootools 1.2.1 introduced a new bug that as yet has not been cured by the developers.
There’s a temporary solution posted in this forum that involves a replacement for Fx.Scroll. The author created a class called Fx.Scroll2 that corrects these issues.
March 13, 2009
Mootools Function for Limiting Number of Checkboxes Checked
Here’s a handy function for controlling how many boxes can be checked in a group of checkboxes. (more…)