2008年9月29日星期一

Re: [fw-mvc] Adding a javascript function to a zend form button

Hi John,

Try setting an attribute for the form element. 

E.g. when using array notation:

$this->addElement('submit', 'submit' array(
'attribs' => array(
'onclick' => 'alert("Hello!")'
)
);

Tom

On 29 Sep 2008, at 15:14, John Antony Riga wrote:

Hi experts, 

I'm trying to add a dojo/javascript function on a form button, when clicked, but I'm having a hard time finding out how to do this. 

Anyone an idea ?

Thanks





没有评论: