I have a IpModel
and second Model is IpSenderScore
,ip_id is foreign key in Ip_history model.
Now I have create a custom button senderscore
in Ip admin view like:
'senderscore' => array(
'label'=>'View SenderScore of This IP',
'imageUrl'=>Yii::app()->request->baseUrl.'/images/loginhistory.PNG',array("style"=>"width:16px;height:16px;"),
'click'=>"function(){ $.fn.yiiGridView.update('user-grid', {
type:'POST',
url:$(this).attr('href'),
success:function(data) {
$('#AjFlash').html(data).fadeIn().animate({opacity: 1.0}, 3000).fadeOut('slow');
$.fn.yiiGridView.update('user-grid');
}
})
return false;
}
",
'url'=>'Yii::app()->createUrl("ipSenderScore/admin",array("ip_id"=>$data->id))',
),
I want to when I click on this button then show a modal window with all ip history that is saved in ipSenderScore model with this ip_id.
How it is possible?