Onchange dropdown set max value dynamically yii CMultiFileUpload


echo $form->dropDownList($model,‘ment_id’, $mentslists,


    'prompt'=&gt;'Select ment',



 echo &#036;form-&gt;error(&#036;model,'ment_id'); 


Onchange dropdownlist i want to set max value for the CMultiFileUpload.

my CMultiFileUpload code is ,


$this->widget(‘CMultiFileUpload’, array(

       'name' =&gt; 'data1',

       'attribute' =&gt; 'image',

       'accept' =&gt; 'doc|docx|pdf|txt|jpeg|jpg|png',

        'max' =&gt; 10,

        'duplicate' =&gt; 'file appears twice',

        'remove' =&gt; Yii::t('ui', 'Remove'),



i tried onchange dropdown get max allowed size value from database , how to apply the value to max field.

my jquery code is ,




 type: &quot;POST&quot;,

 url: &quot;/assig/default/GetAssignDetails&quot;,

 data: {'a_id':&#036;(this).val()},

 success: function(data){

     //data having the max upload value               




my controller code is ,

public function actionGetAssignDetails()


    &#036;id = &#036;_POST['a_id'];

    &#036;assign_details = Assig::model()-&gt;findAllByAttributes(array('id'=&gt;&#036;id));

    echo &#036;assign_details[0]['c_max_upload_files'];



how to set the max value dynamically based on changing dropdown list ,