当在表中单击某行时,我正在使用引导程序模式弹出。当它弹出时,我将获得所需的所有值。我在模态中有三个按钮。我需要其中之一仅根据显示的值之一显示。我目前有一个php if语句来确定按钮是否显示。我不确定如何从当前模式中获取值到php if语句
<div class="modal hide fade" id="myModal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Message Information</h4>
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div id="rowID" class="modal-body">
<table class="table table-bordered">
<thead>
<!-- bgcolor="#D4AF37" -->
<tr>
<th>Note Code</th>
<th>Start Date</th>
<th>End Date</th>
<th>Recurring</th>
<th>Active</th>
<th>Activity Date</th>
<th>Message Key</th>
<th>Period Key</th>
<!-- <th>Message Text</th> -->
</tr>
</thead>
<tbody>
<tr>
<td id="noteCode"></td>
<td id="startDate"></td>
<td id="endDate"></td>
<td id="recurring"</td>
<td id="active"></td>
<td id="activityDate"></td>
<td id="messageKey"></td>
<td id="periodKey"></td>
<!-- <td id="messageText"</td> -->
</tr>
</tbody>
</table>
<h5>
<b>Message text</b>
</h5>
<p style="font-size: 16px" id="messageText"</p>
</div>
<div class="modal-footer">
<div id="end" class="text-left">
<button type="button" class="btn btn-end" title="Stop Message Period">Stop</button>
<?php
$can_delete = $bw_message->can_delete($$period_key);
if ($can_delete) {
echo '<div id="delete" class="text-left">';
echo '<button type="button" class="btn btn-delete" title="Delete Message Period">Delete</button>';
echo '</div>';
}
?>
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
我正在使用的特定语句是
<?php
$can_delete = $bw_message->can_delete($$period_key);
if ($can_delete) {
echo '<div id="delete" class="text-left">';
echo '<button type="button" class="btn btn-delete" title="Delete Message Period">Delete</button>';
echo '</div>';
}
?>
任何帮助将不胜感激。