Re: QuickForm behavior on Input field
| From: | Ignatius Reilly | Date: | Wed, 15 Feb 2006 08:48:19 +0000 |
| Subject: | Re: QuickForm behavior on Input field | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-22974@lists.php.net to get a copy of this message | ||
cwhisperer thus spake on 2006-02-15 09:06:
Hi, I have an Input field which accept only numeric values and want to add a behavior like 'onChange' or 'onKeyUp' to compute with this new value. Here what I have for now, but doesn't work: $form->addElement('text', 'txtPrgSoc', 'Persons:', array('size' => 40,'maxvalue' => '2'),'onKeyUp="totalAmount()"'); Thank you for any help A.Try this: $form->addElement('text', 'txtPrgSoc', 'Persons:', array('size' => 40,'maxvalue' => '2', 'onKeyUp' => 'javascript:totalAmount();'));