Hello, I am developing a new application, this have activeTextField which I want to activate a function that is in a class model, I use the following code to activate event in the view that display the activeTextField:
<div class="simple">
<?php echo CHtml::activeLabelEx($model,‘IdUsuario’); ?>
[b]<?php echo CHtml::activeTextField($model,‘IdUsuario’, array(‘onclick’ => ‘alert(1234)’)); ?>
[/b]</div>
<div class="simple">
<?php echo CHtml::activeLabelEx($model,‘TipoHoraLaboral’); ?>
<?php echo CHtml::activeDropDownList($model,‘TipoHoraLaboral’,TipoHoraLaboral::model()->TiposHoralaboral); ?>
</div>
This displays a message to verify that the event is working properly, so I can not do is call the function that is in the class of the model, but I don’t know how to call the function from the event activeTextField, someone could help me with this, or at least give me one example where you do something like that.