Onchange dropdown set max value dynamically yii CMultiFileUpload

<?php

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

    array(


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


    'class'=&gt;'required'


 ));


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


 ?&gt;

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

my CMultiFileUpload code is ,

 &lt;?php

$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'),


      ));


    ?&gt;

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

my jquery code is ,

$("#ment_id").on(‘change’,function()

  {


&#036;.ajax({


 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'];


    exit;


}

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