How to open a window with a specific outer height on Internet Explorer
Unfortunately, the window.open function on Internet Explorer doesn't support the outerWidth and outerHeight parameters. The function below does the job – but is there really no easier way?
function openPopup(url, width, height, params) {
var w
if (params)
w = window.open('about:blank', '_blank', params)
else
w = window.open('about:blank', '_blank')
w.document.open()
w.document.writeln('<script>')
w.document.writeln('window.resizeTo(' + width
+ ',' + height + ');')
w.document.writeln('</sc'+'ript>')
w.document.close()
w.document.location.href = url;
}
Comments