I want to capture javascript/PHP variable in the ajaxoptions' options. e.g;
CHtml::ajaxLink("My link", Yii::app()->createUrl('controller/definition'), array(
'data' => array("id" => $model->id),
'type' => 'POST',
'error' => 'js:function(data){}',
'beforeSend' => 'js:function(request){}',
'success' => 'js:function(data){
alert(jQuery(this).attr("id"));
alert({$model->id});
}',
'complete' => 'js:function(data){}',
//'update'=>'#where_to_put_the_response',
), array(
"confirm" => "Are you sure you want to delete?",
"id" => "linkID",
"href" => "javascript:;",
"title" => "mTitle"
)
);
In the success option I have two alerts to show you guyz how do i want it. Which doesn't display correct data. Is there any way to get the php variables and the jQuery(this) object?