Changing an element's class via AJAX

Greetings folks,

Does anyone know how I can modify a DOM element’s
class on the fly via AJAX? Is this even possible?

I basically want to toggle a background color after the
user updates a pass/fail attribute on one of my models.

Thanks in advance.

Regards,
Franz

On Aug 29, 9:37 am, “Franz S.” [email protected] wrote:

Greetings folks,

Does anyone know how I can modify a DOM element’s
class on the fly via AJAX? Is this even possible?

I basically want to toggle a background color after the
user updates a pass/fail attribute on one of my models.

Use prototype addClassName, removeClassName, toggleClassName utilities
or just fiddle with the element’s className directly

Fred