What is the alternative for the showmodaldialog function?

0

On my system modal popups no longer work in Chrome or Firefox after upgrading the JQuery component. The application is Webform and has several popups and it is essential that they be modal. What's the alternative to the code below?

   var ReturnValue = window.showModalDialog("/Popups/Cancelados/frmConPesPCanc1.aspx?doc=" + cgc + "&txAnos=" + slAnos, "", "dialogHeight: 600px; dialogWidth:1000px; dialogTop: 50px;  edge: Raised; center: Yes; help: No; resizable: Yes; status: No;");
    
asked by anonymous 18.02.2016 / 03:13

1 answer

0

As you are using webforms, a good alternative would be to use the bootstrap modal, they are elegant and work very well.

<button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">
 Launch demo modal
 </button>

 <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">Modal title</h4>
          </div>
          <div class="modal-body">
            ...
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            <button type="button" class="btn btn-primary">Save changes</button>
          </div>
        </div>
      </div>
    </div>

Reference

    
18.02.2016 / 21:57