I am trying to let the user set the height width and color for a new pop up window here is some example code of what i have been trying
<input type = "button" value = "Open New Window"
onclick = "NewWin = window.open('','NewWin',
'toolbar=no,status=no,width=200,height=document.getElementsByName('height')[0].value');" />
i have also tried setting height to a variable and saying height height=heightVar and that didnt work. Is there a bit of syntax that im using wrong?
You will have to separate the javascript from the markup. That's a common best practice for developing in HTML/Javascript. I've put an example in jsfiddle:
HTML:
Javascript:
http://jsfiddle.net/yg9jeyza/2/