Setting minimum size for JavaScript popup
When creating popups, you can only set width and height. But since the popup was created, this means that you can change the height and width of the window when the popups are loaded. Just place the onload event inside the popup:
window.onload = function() {
if (document.body.scrollHeight) {
var winWidth = document.body.scrollWidth;
var winHeight = document.body.scrollHeight;
} else if (document.documentElement.scrollHeight) {
var winHeight = document.documentElement.scrollHeight;
var winWidth = document.documentElement.scrollWidth;
} else {
var winHeight = document.documentElement.offsetHeight;
var winWidth = document.documentElement.offsetWidth;
}
window.resizeTo(winWidth, winHeight);
}
edit: Tested in IE7.8, Chrome, Safari 4, Firefox 3. Works, but you may need to consider menu size + address bars and such as the window size will be the outer size and this function will find the size of the content. So to be on the safe side, you should probably add a couple of pixels and also disable scrollbars in the popup to make sure they don't take up space.
a source to share
When using windows.open, you can specify the height and width of the window as follows:
window.open (" http://www.stackoverflow.com ", "MyWindow", "MenuBar = 1, resizable = 1, width = 350, height = 250 ");
However, this is not the minimum size, as the window will no longer be larger when there is more space. To do this, you will need to check the screen space.
a source to share
http://www.htmlgoodies.com/beyond/javascript/article.php/3471221
As you can see from the link, you can set the minimum size. If you want to scale it to be larger, you must do so from the popup.
a source to share