April 14, 2005

Ajax in Cocoon: dead simple!

Buzz buzz buzz...

Today, I added Ajax support to Cocoon, starting with form handling.

How do you Ajaxify a form? Add ajax="true" to your form-template element. How do you write a new Ajax-aware widget styling? Just output plain HTML. How to handle non Ajax-able browsers? Nothing to do, it automatically falls back to full-page refreshes.

Dead simple, I told you!

Posted by Sylvain Wallez at April 14, 2005 07:02 PM
Comments

I've been thinking about this for some time now, although I haven't implemented it (will work on that this week.A tutorial woud be nice though. Anyway, thanks for this.

Posted by: toxicafunk on April 18, 2005 04:39 PM

This looks really great, I've been looking to use an Ajax approach to provide client side validation and enforcing constraints on form fields. Does the current implementation provides any support for this? e.g. to constraint an input text box to allow only the insertion of 0 to 9 digits, when the associated datatype is a number? I'm currently planning to use some JS handler for the OnKeyPressed event to filter key codes, but I don't want to reivent the weel! :)

Posted by: Carlos Gama on June 23, 2005 12:45 PM