ShowModalDialog is deprecated by Chrome37, other suggestions?

Does anyone have any viable suggestions for replacing showModalDialog () functions in Chrome 37? I realize there is a way up to May 2015, but that is not "viable" in my opinion, and if I can avoid changing everything on the window.open () function that would be great.

+3


source to share


1 answer


Do you have any code that you link? I can see that you tagged jQuery. So I'll give jQuery's answer.

You can use the following code to "open" or "show" the jquery dialog



$(divSelector).dialog('open');

$(divSelector).dialog({
    autoOpen: false,
    width: 200,
    modal: true,
    closeOnEscape: true,
    draggable: false,
    resizable: false,
    buttons: {'Ok': function(){
      $(this).dialog('close');
    }}
});

      

.dialog ('open') will cause the dialog to open. I'm not sure how difficult it would be to wrap your div div in $ divSelector.dialog tags and include jQuery UI css and javascript in your application.

+2


source







All Articles