I need to attach some javascript to the onchange event of the Zend_Form_Element. How do I do that?
Try with setAttrib($name, $value), for example:
$element->setAttrib('onchange', 'jsFunction();');
You can find more detailed information about Zend_Form_Element's here.