Select Box Onchange For Select State By County And Onchange Search Result Not Working Simultaneously

index.php file

<php

$(‘select’).change(function(){

$(’#gridDiv’).show(‘fast’);

&#036;.fn.yiiListView.update('searchlist', {


 


	data: &#036;('form').serialize()


});


return false;

});

");

?>

<h1>Quick Search</h1>

<div class="search-form" style="width:100%">

&lt;div style=&quot;width: 40%;float:left;&quot;&gt;

<div >

<?php $this->renderPartial(’_search1’,array(

'model'=&gt;&#036;model,

)); ?>

</div><!-- search-form -->

&lt;/div&gt;


&lt;div style=&quot;width: 60%;float: right;&quot;&gt;

<div id="gridDiv">

<?php $this->widget(‘zii.widgets.CListView’, array(

‘dataProvider’=>$model->search(),

‘itemView’=>’_view’,

‘id’=>‘searchlist’,

)); ?>

</div>

&lt;/div&gt;

</div>

and search1.php file like

<div>

&lt;?php echo &#036;form-&gt;label(&#036;model,'talentrgd_country_id'); ?&gt;


&lt;?php


&#036;country = new CDbCriteria;


&#036;country-&gt;order = 'country_name ASC';


?&gt;


&lt;?php


echo &#036;form-&gt;dropDownList(&#036;model,'talentrgd_country_id',CHtml::listData(Country::model()-&gt;findAll(&#036;country),'country_id','country_name'),


array(


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


                        'ajax' =&gt; array(


                        'type' =&gt; 'POST',


                        'url' =&gt; CController::createUrl('quicksearch/dynamicstates'),


//'update' =&gt; '#talentrgd_state_id',


						 'update'=&gt;'#Quicksearch_talentrgd_state_id',


						'data'=&gt;array('talentrgd_country_id'=&gt;'js:this.value'),


)


)


);


?&gt;


&lt;?php echo &#036;form-&gt;error(&#036;model,'talentrgd_country_id'); ?&gt;


&lt;/div&gt;





&lt;div&gt;


&lt;?php echo &#036;form-&gt;label(&#036;model,'talentrgd_state_id'); ?&gt;


&lt;?php


&#036;allState = new CDbCriteria;


&#036;allState-&gt;order = 'state_name ASC';


echo  &#036;form-&gt;dropDownList(&#036;model,'talentrgd_state_id',CHtml::listData(State::model()-&gt;findAll(&#036;allState),'state_id','state_name'),


array(


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


                        'ajax' =&gt; array(


                        'type' =&gt; 'POST',


                        'url' =&gt; CController::createUrl('quicksearch/dynamiccities'),


						'update'=&gt;'#Quicksearch_talentrgd_city_id',


						'data'=&gt;array('talentrgd_state_id'=&gt;'js:this.value'),


) ));





?&gt;

when i click on country it show right result for searching but it not working to get state by country

Please help

Thanks in advance

Wrap your code within code tag for better view.




[code]

code here



[/code]