Tuesday, March 1, 2011

Attach JavaScript event handler to Zend_Form_Element

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

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

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

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

0 comments:

Post a Comment