Hi Expert,
I have done ticket list and after clicking an ticket_id it will show popup witht details of that tickets. First time when page loaded it will take correct ticket_id in details page when click an ticket_id . But I faced problem if the list refreshed using ajax
Ex: Any paging or filter search or advance search .
The value is showing correctly but in details page post value of ticket_id is getting wrong (First time when page loaded this ticket number is going as a POST value).
Please anyone give me solution as it’s urgent.
Details Code:
View Page
$this->widget(‘zii.widgets.grid.CGridView’, array(
'dataProvider' => $model->searchAllTicket(),
'id' => "bet_list",
'selectionChanged' => 'detailsDiv',
'selectableRows' => 1,
'columns' => array(
array(
'header' => 'Ticket Number',
'name' => 'bet_id',
'type' => 'raw',
'value' => 'CHtml::[b]ajaxLink[/b](
$data["bet_id"],
"bet/details",
array(
"type" =>"POST",
"update" => "#detailsDiv",
"data" => array("ticket_id" =>$data["ticket_id"]),
)
)',
),
));
}
");
<div id=‘detailsDiv’></div>
Controllers
public function actionDetails()
{
print $_POST['ticket_id'];
}