Below is the ajaxLink code I am using . I am posting car_type and car_id to my controller , after its successful return in “success”=>‘js:function(data){ }’ is there any way I can get car_type and car_id . Thank You
echo (
CHtml::ajaxLink(
'Delete',
Yii::app()->createUrl("partMgmt/removecar"),
array(
"type"=>"POST",
"data"=>array(
"car_type"=>$myplaces[$i]['car_type'],
"car_id"=>$myplaces[$i]['car_code'],
),
"success"=>'js:function(data){
}',
),
array(
"onclick"=>"if (!confirm('Are you sure?\\r\\nYou are going to unregister for this place.')){return}"
)
)
);
To whatever controller you’re posting your data, echo back the car_type and car_id using the CJSON::encode, catch that in your success: function(data) { data.car_type and data.car_id}