Cactiveform Dependent Dropdown Won't Work Inside Pjax'ed Content

[font=“Arial”]here’s my dependent dropdown php code:[/font]

[font="Courier New"]<?php $find= new SomeModule;

  &#036;form=&#036;this-&gt;beginWidget('CActiveForm', array(


     'action'=&gt; Yii::app()-&gt;createUrl('someurl'),


     'method'=&gt;'post',


     'id'=&gt;'filter-id',


     'enableAjaxValidation'=&gt;true,


  )); ?&gt;

<?php

echo $form->dropDownList($find,‘category’,

CHtml::listData(BaseCategory::model()-&gt;findAll(array(


   'order' =&gt; 'name', 


   'condition'=&gt;'type=:postID',


   'params'=&gt;array(':postID'=&gt;1),


)), 'id', 'name'),


array(


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


   'ajax'=&gt;array(


   'type'=&gt;'POST',


   'url'=&gt;CController::createUrl('someurl/searchCategory'),


   'update'=&gt;'#'.CHtml::activeId(&#036;find,'category2')


),

)

);

?>

<?php

echo $form->dropDownList($find,‘category2’, array(), array(

'prompt'=&gt;'Select Sub Category',

)

);

?>[/font]

[font=“Arial”]I need to place this php code inside pjax content. Working fine when the page refreshed. But when it’s loaded using pjax, this dependent dropdown won’t work.[/font]

question:

[font="Arial"]How to make this dependent dropdown working when its loaded using pjax? What code should I add in:[/font]

[font="Courier New"]$(document)

.on('pjax:success', function() {





})[/font]

[font="Arial"]to make this dependent dropdown works? Is there any script to "reload" this php code, so the dependent dropdown works? Or is there another solution?[/font]

bump

bump