[英]modal popup not showing on top of another modal popup
我試圖在另一個模態上使用模態作為確認提示,但確認模態在onclick上不是可變的。 這是我設置的模態屬性。
我在我的asmx文件中調用我的父模態,然后我也在asmx文件中調用我的子模態函數。
<div id="ShowDetails" class="popup" tabindex="-1" style="position:absolute;" role="dialog">
<div class="panel panel-green">
<div class="panel-heading">Parchase Request Details</div>
<div class="panel-body">
<div class=" col-md-12">
<div class="form-inline">
<input id="pdid" style="display: none; width: 90PX; margin: 2px;" type="hidden" />
<%--<asp:HiddenField ID="PDId" runat="server" />--%>
<table class="table table-condensed">
<tr>
<td>
<input id="item" style="display: none; width: 90PX; margin: 2px;" /></td>
<td>
<input id="quantity" style="display: none; width: 90PX; margin: 2px;" />
</td>
<td>
<input id="eprice" style="display: none; width: 90PX; margin: 2px;" />
</td>
<td>
<input id="make" style="display: none; width: 90PX; margin: 2px;" />
</td>
<td>
<input id="discription" style="display: none; width: 90PX; margin: 2px;" />
</td>
<td>
<a id="DoneEditingbtn" role="button" onclick="DoneEditing()" style="color: #72c02c; display: none; width: 100PX; margin: 2px;">Update</a>
</td>
<td><a id="cancleediting" role="button" onclick="cancleeditingdetail()" style="color: #72c02c; display: none; width: 100PX; margin: 2px;">cancel</a>
</td>
</tr>
</table>
<table class="table table-condensed">
<thead>
<tr style="background-color: #01cc66;">
<th>Item Name</th>
<th>Quantity</th>
<th>Estimated Price</th>
<th>Make</th>
<th>Discription</th>
<th>Options</th>
</tr>
</thead>
<tbody id="tblgetdetails">
</tbody>
</table>
<div id="Alert"></div>
</div>
</div>
</div>
<span class="popup-btn-close" data-dismiss="modal">close</span>
</div>
</div>
<div id="ApproveMod" class="popup" style=" z-index:2; position:absolute; left: 50%; width: 40%; border: 10px solid #666;">
<div class="col-lg-6">
<i>Are you sure to Approve this data?</i>
</div>
<i id="pheadIdApp"></i>
<i id="pbdIdApp"></i>
<div class="col-lg-6">
<a class="btn-u btn-u-red" href="#" role='button' style="text-align: center; width: 45%;" onclick="Approve()">Yes </a>
<button class="btn-u btn-u-green-custom " style="text-align: center; width: 45%;" data-dismiss="modal">NO</button>
</div>
</div>
父模式正確顯示但是當我點擊應該切換子模態的父模態按鈕時,不起作用,在ASMX中我已經在onclick上定義了我的子模態函數,如下所示。
<a role='button' class='form-control' onclick='AppModal(PHId+","+PBDId)'>Approve</a>
這是我在腳本中使用的子調用方法。
function AppModal(phid,pbdid) {
$("#pheadIdApp").val(phid);
$("#pbdIdApp").val(pbdid);
$("#ApproveMod").modal("show");
}
它應該工作正常我已經使用了很多次,但現在我卡住了,不知道我可能錯過了什么樣的技巧,任何一種幫助都是非常好的。
它真的很有趣昨天我得到了你的問題的答案,這是關於同樣的問題,現在我發現你卡在這里。 將您的子模態位置更改為相對,並將z-index值指定為大於1040,這是默認圖層。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.