What is the alternative to the showmodaldialog function?

Asked

Viewed 156 times

0

On my system modal popups no longer work in Chrome or Firefox after updating the Jquery component. The application is Webform and has several popups and it is essential that they are modal. What 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;");

1 answer

0


Since you are using webforms, a good alternative would be to use the modal of bootstrap, 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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.