Modal does not open after using $ ('. modal-backdrop'). remove ()

-1

I'm working with WebForm, using MasterPage.

My child page is inside the UpdatePanel , via C # I call opening a modal within another modal, but each modal opening darkens the background, and when I say close the modal until more date only the modal dark curtain keeps from behind and does not disappear.

To close this curtain I use $ ('. modal-backdrop'). remove (), remove the curtain the problem is that it does not open the modal anymore.     

asked by anonymous 07.12.2017 / 13:11

2 answers

1

It is likely that the modal element is a child of the modal-backdrop element, so when you give remove () the element and its children are deleted from its structure.

It may be more interesting to use .hide ()

    
07.12.2017 / 15:45
0

[Resolved]

$ ('. modal-backdrop'). remove () - Kill modal html

I solved the structure below

Master

Daughter Page

 <asp:ScriptManager EnablePartialRendering="true"  ID="ScriptManager1" runat="server"></asp:ScriptManager>

 <asp:UpdatePanel ID="UpdatePanel2" runat="server"  >
   <ContentTemplate>
         --- Modal ---
   </ContentTemplate>
 </asp:UpdatePanel>

<Triggers>                                                              
    <asp:AsyncPostBackTrigger ControlID="btnImportarGrade" />
</Triggers>

<Triggers>
    <asp:PostBackTrigger ControlID="imbDownloadTemplate" />
</Triggers>
    
13.12.2017 / 10:37