Google searching says window.outerWidth and window.outerHeight will return the outer dimensions of the current window. However, my HTA file opening in IE11 gives "undefined" for these properties. What am I doing wrong?
<!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>Size Test</TITLE>
<SCRIPT type="text/javascript">
function ShowSize() {
window.alert("W = " + window.outerWidth+ ", H = " + window.outerHeight);
}
</SCRIPT>
<HTA:APPLICATION ID="oHTA"
applicationName="Size Test"
border="dialog"
borderStyle="normal"
caption="yes"
innerBorder="no"
maximizeButton="no"
minimizeButton="no"
navigable="no"
scroll="no"
selection="yes"
showInTaskbar="yes"
singleInstance="yes"
sysMenu="no"
windowState="normal"
/>
</HEAD>
<BODY>
<button onclick="ShowSize()">test</button>
</BODY>
</HTML>
The alert dialog shows "W = undefined, H = undefined" (dammit).