Will anyone please tell me what is wrong with this snippet?
<!DOCTYPE html>
<html>
<head>
<script>
function anotherWindow(msg, myWidth, myHeight)
{
theWindow=window.open('','','width=myWidth,height=myHeight');
theWindow.document.write(msg);
theWindow.focus();
}
</script>
</head>
<body>
<input type="button" value="One more window" onclick="anotherWindow('Here is the window',200,100)" />
</body>
</html>
While the first argument (msg) is successfully passed to method .write, the two arguments related to window size in method .open bring no result —the method sticks to some defaults.
What is wrong with my understanding of variable passing?