I used window.showModalDialog(url,windowName,status)to open a popup window on IE and the popup window can’t resizeable.
The showModalDialog doesn’t work on Edge ,so I use window.open(url,windowName,status) to replace it on Edge,but the resizeable=no option of window.open(url,windowName,”resizeable=no”) does’t work on Edge.
How can I enable my popup window resizeable with window.open() on Edge?
Advertisement
Answer
The showModalDialog()
method is obsolete. For window.open()
, IE supports disabling the resizing, but other browsers no longer support it. You can check the Parameter Values of this link.
As a workaround, you can use jQuery EasyUI Dialog. You can refer to the example below:
$(function() { $('#dd').dialog({ title: 'My Dialog', width: 400, height: 200, closed: false, cache: false, href: 'http://www.google.com', modal: true, resizable: false //It can define whether the dialog box can be resized. }); })
<link rel="stylesheet" type="text/css" href="https://www.jeasyui.com/easyui/themes/default/easyui.css"> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.min.js"></script> <script type="text/javascript" src="https://www.jeasyui.com/easyui/jquery.easyui.min.js"></script> <div id="dd">Dialog Content.</div>