var w=300;
var h=300;
function openWin()
{
w=window.open("http://www.google.com","mywin","width=w, height=h,screenX=50,left=50,screenY=50,top=50,status=no,menubar=no");
}
<input type="button" value="Start" onclick="openWin()" />
Hi all,
I would like to know to use my own variables (var w and h)in defining opened windows.
No matter what combination I try, the width and height attributes just don’t work.
Thanks!
You need to use the variable, not just throw the letter in. Like this: