Problems with ClientScript

Hi again people,

I havin a problem with jquery scripts.

I have a form, with various maskedTextFields, but one of them i used a jquery plugin, switch the Yii don’t have.

My form:


<div class="row">

            <?php echo $form->labelEx($mveiculos, 'valor'); ?> 

            <?php echo $form->textField($mveiculos, 'valor', array()); ?>

            

            <?php echo $form->error($mveiculos, 'valor'); ?>


           


        </div>

        

        <div class="row checkbox">

            <p class="bold">Selecione os combustíveis usados por seu veículo.</p>

            <?php echo $form->checkBoxList($mcombustiveis, 'cod_combustivel', CHtml::listData($mcombustiveis->findAll(), 'cod_combustivel', 'desc_combustivel')) ?>

            <?php echo $form->error($mcombustiveis, 'cod_combustivel'); ?>

        </div>

        <div class="row">

            <?php echo $form->labelEx($mveiculos, 'ano_fabricacao'); ?> 

            

            <?php

                 $this->Widget('CMaskedTextField',

                        array(

                            'mask'=>'9999',

                            'model'=>$mveiculos,

                            'placeholder'=>' ',

                            'attribute'=>'ano_fabricacao',

                            'htmlOptions' => array ('size' => 4),

                        ));

            ?>

            

            <?php echo $form->error($mveiculos, 'ano_fabricacao'); ?>

        </div>

The field "Valor" use a jquery plugin that i had included in the my Controller.

The part relevant of the controller:


 Yii::app()->clientScript->registerScriptFile('/emc001/js/jquery.maskMoney.js',CClientScript::POS_END);

            

            $this->render('info_Veiculos', array(

                  'mveiculos' => $mveiculos,

                  'mmarcas' => $mmarcas,

                  'mcombustiveis' => $mcombustiveis,

                  'mtiposVeiculos' => $mtiposVeiculos,

                  'mmodelos' => $mmodelos,

                  'mopcionais' => $mopcionais,

                  'manuncios' => $manuncios,  

            ));

            

My problem is.

When i put the registerScript after the render, the mask of the Widget (CMaskedTextField) not works,

When i put the registerScript BEFORE the render, the mask of field Valor not works.

Somebody can help me?

someone?

Well,

I solved the problem, using registerCoreScript().

Big Hugs