How can I change 'change' to 'keypress' event in jquery live?


I would like to invoke an Ajax request on the keypress event of a textfield, I’m using Yii’s built in Ajax functionality, but I can’t seem to change the event parameter in the live function. Any suggestions?


Use htmlOptions:

CHtml::activeTextField($model, $attribute. array('onkeypress'=>CHtml::ajax([...])))

Cool, thanks.

Hi can u post example in breif.