Mutiple Dependent Dropdowns In Update

I Have three dropdown one depent on other i user trigger for first dropdown in update case


Yii::app()->clientScript->registerScript(__CLASS__,'

   $("#branch_id").trigger("change");   

', CClientScript::POS_READY);

?>





 $opts = CHtml::listData(branchDetails::model()->findAll(),'branch_id','branch_name');

                                  

								   echo CHtml::dropDownList('branch_id',$select_branch,$opts,array(

                                    'prompt'=>'Select',

                                    'ajax' => array(

                                    'type'=>'POST', 

                                    'url'=>CController::createUrl('account/get_course'),

                                    'data'=> array('branch_id'=>'js:this.value'),

									'success'=>"function(data) {

										$('#course_id').html(data);

										$('#course_id').val($select_course);

										$('#course_id').trigger('onchange');	// It is not working					   

                    				}",

                                    ))); 

                               ?>


   <?php

								

                                 $opts = array();

                                 echo CHtml::dropDownList('course_id','',$opts,array(

                                'prompt'=>'Select',

                                'ajax' => array(

                                'type'=>'POST',

                                'url'=>CController::createUrl('account/get_batch'), 

                                'data'=> array('course_id'=>'js:this.value'),

                                'success'=>"function(data) {

										$('#batch_id').html(data);

										$('#batch_id').val($select_batch);										   

                    				}", 

                               ))); 

							

                               ?>




   <?php 

                              

                                echo CHtml::dropDownList('batch_id',$select_batch,$opts,array('prompt'=>'Select')); 

                               ?>

Use kartik depDrop