Home & blog  /  Tag: validation  /

Ajaxify - re-route your forms via AJAX

posted: 06 Jun '10 12:38 tags: AJAX, form, validation, Javascript, jQuery

Ah, AJAX. From cleaning product to elegant means of sending and retrieving data without clunky page loads. There were those of us who, before AJAX came along, used to route forms through hidden iframes to achieve a similar effect.

But re-wiring your forms to go via AJAX can be time-consuming and tough, so I've just posted Ajaxify, which does it for you.

Head over here to download, get usage info or view a demo.

It acts on any form that has a class in the following format. The part after the hyphen is the name of an optional callback function to which the AJAX response is passed:

class='ajaxify-mycallback'

The only snag is it doesn't presently support file uploads, since there remains no way (or at least no way without a lot of fudge) to do thise in AJAX. I'll soon be modifying it, though, to route file uploads as a separate request through a DOM-scripted, hidden iframe.

post a comment