Help with jQuery.ajax

The problem that I am having is that I need to get the email from the user I am selecting from the "Select2" dropdownlist. And then send it to the textfield named in this case "#RolGroup_rog_email_user".

Help me please




 $this->widget('ext.ESelect2.ESelect2',array(

'model'=>$model,               

'attribute'=>'uam_user_id',                                                    

'data'=>$data,

'options'=> array(

            'placeholder'=>'Select One',

            'allowClear'=>true,

            ), 

));

$url=CController::createUrl('rolGroup/getEmail');

                                   Yii::app()->clientScript->registerScript(                                                        

                           "jQuery.ajax({

                           type: 'POST',

                           url: '".$url."',

                           update:'#rog_email_user',                                                        

                           success: function(html){

                           jQuery('#RolGroup_rog_email_user').val(html);

                           }

                           });

                           ",

                              CClientScript::POS_READY

);