Forum OpenACS Q&A: Re: examples of widgets using Ajaxhelper?

Collapse
Posted by Dave Bauer on
What I would recommend is adding an HTML class for the type of widget you'd like to add ajax behavior, then you can add javascript behavior to the element based on the class, or HTML ID (automatically generated in newer openacs versions).

This is known as progressive enhancement. That is, make sure it works without javascript first, then add optional javascript behaviors.

Here is some background https://openacs.org/xowiki/ajax-accessibility

Not only does this make your site accessible, it is good form, seperation, and abstraction.

Collapse
Posted by Brian Fenton on
Hi Dave,

that's very sound advice - thanks for pointing that out. I'd like to take that approach. Do you know of any examples around of the use of Ajax with template::form?

thanks
Brian