繁体   English   中英

模态弹出窗口没有显示在另一个模态弹出窗口的顶部

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM