Search code examples
asp.nethtmljscript

Open modal popup on another modal popup


I want to show a modal on another modal while its still visible. I am unable to understand what should I do. I tried z-index but its not working for me. Any kind of guidance is much appreciated.


Solution

  • try this

    • Data-dismiss: used for closing modal.
    • Data-toggle:used for popup modal.
    <a data-dismiss="modal" data-toggle="modal" href="#ModalId">Click</a>
    

    OR you can use onclicke method.

    <a id="ID" data-dismiss="modal" data-toggle="modal" onclick="functionShowModal()">Click</a>
    

    Jscript

       functionShowModal()
    {
    $("#ID").load("#ModalId");
    }
    

    You have to define z-index for them accordingly as well. You will find more about z-index here