javascript - modal popup not showing on top of another modal popup -


updated

i trying use modal confirmation prompt on modal confirmation modal not vissible on onclick. here modals properties set.

parent modal.

i calling parent modal in asmx file , calling child modal function in asmx file well.

<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> 

confirmation modal.

    <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 sure approve 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> 

the parent modal showing when click on parent modal button should toggle child modal, not working, in asmx have defined child modal function on onclick following.

<a role='button' class='form-control' onclick='appmodal(phid+","+pbdid)'>approve</a> 

here child calling approach used in script.

function appmodal(phid,pbdid) {         $("#pheadidapp").val(phid);         $("#pbdidapp").val(pbdid);         $("#approvemod").modal("show");     } 

it should work have used many times stuck , have no idea might have missed trick kind of much apriciated.

its funny yesterday got answer problem same problem , find stuck here. change child modal position relative , assign z-index value greater 1040 default layer.


Comments