views:

339

answers:

1

I need to attach some javascript to the onchange event of the Zend_Form_Element. How do I do that?

+3  A: 

Try with setAttrib($name, $value), for example:

$element->setAttrib('onchange', 'jsFunction();');

You can find more detailed information about Zend_Form_Element's here.

CMS