Dropdown




<?php 

echo CHtml::DropDownList('HiflashOrder[project_id]','',CHtml::listData(HiflashProjects::model()->findAll(), 'id', 'project_name'), array('empty'=>'Select Projects','style'=>'width:150px;'), array(

                   'onClick'=>"$.ajax{(

                         url:'" . Yii::app()->createUrl("HiflashOrder/ProjectFilter") ."',

                         type: 'POST',

                         success: 'function(data) { 

                                 $.fn.yiiGridView.update('order-grid', 

                                  {

                                      type:'GET', 

                                      url:'".Yii::app()->createUrl('hiflashOrder/admin')."', 

                                      data: $('#search_form').serialize()

                                  }); 

                                  }'

                               )};"

                       )); ?>

So the thing is what i have done is right or wrong? If so y its not showing the specified details alone?

CHtml::DropDownList takes 4 parameters but you have 5. Looks like you got the last array in twice.

Does this work?




<?php 

echo CHtml::DropDownList(

	'HiflashOrder[project_id]' 

	,'' 

	,CHtml::listData(HiflashProjects::model()->findAll(), 'id', 'project_name'),

	array(

		'empty'=>'Select Projects',

		'style'=>'width:150px;',

                'onClick'=>"$.ajax{(

                        url:'" . Yii::app()->createUrl("HiflashOrder/ProjectFilter") ."',

                         type: 'POST',

                         success: 'function(data) { 

                                 $.fn.yiiGridView.update('order-grid', 

                                  {

                                      type:'GET', 

                                      url:'".Yii::app()->createUrl('hiflashOrder/admin')."', 

                                      data: $('#search_form').serialize()

                                  }); 

                                  }'

                               )};"

                       ));  ?>



see uh that code what i posted is wrong i asked suggestions to correct it. now i corrected it. so u want any help?