in notification list I used sql query to display domain name but i want to each domain name when I click on that will open popup with there details.
this is header file---
<!-- notification start -->
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Notification <b class="caret"></b></a>
<ul class="dropdown-menu short-dropdown-menu">
<li class=""> <a href="<?=Url::to(['domains/index']);?>">
<?php
$domains=Domains::find()
->Where('expirydate BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 1 MONTH)')
->andWhere(['or',
['status'=> 'Active'],
['status'=> 'Pending Transfer']
])
->orderBy(['expirydate' => SORT_ASC])
->all();
$domainList=ArrayHelper::map($domains,'id','domainname');
foreach($domainList as $key => $value)
{
print '<br>'. $value .'<br>';
}
?>
</a></li>
</ul>
</li>
<!-- notification ends -->
now result is open like ---
when click on that domain name it have to display popup with details like below image-----
UPDATE QUESTION:
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Notification <b class="caret"></b></a>
<ul class="dropdown-menu short-dropdown-menu">
<li class="">
<a href="#modal-domaindetails" data-toggle="modal" onclick="getDomainDetails('2696')">
<?php
$domains=Domains::find()
->Where('expirydate BETWEEN NOW() AND DATE_ADD(NOW(), INTERVAL 1 MONTH)')
->andWhere([
'or',
['status'=> 'Active'],
['status'=> 'Pending Transfer']
])
->orderBy(['expirydate' => SORT_ASC])
->all();
$domainList=ArrayHelper::map($domains,'did','domainname');
foreach($domainList as $key => $value) {
print '<br>'. $value .'<br>';
}
?>
</a>
</li>
</ul>
</a>
</li>
see this now i am passing id 2696 but i want to take id as per domain name how is it possible