Can't get window to work!

admin

Administrator
Staff member
Hi, I'm trying to get a window to open from a user's input. I've been struggling to get it to work. Here is my code, any help at all would be greatly appreciated. I'm going crazy over this!
<html>
<head>
<title>Window Manipulation</title>
</head>
<body>
<script language="javascript">
var winURL=document.windowForm.url.value;
var winWidth=document.windowForm.screenwidth.value;
var winHeight=document.windowForm.screenheight.value;
var winTop=document.windowForm.positonheight.value;
var winLeft=document.windowForm.positionwidth.value;

var winOutputSettings="width="+winWidth+",height="+winHeight
alert(winOutputSettings)
function changeWindow(){
var myWin=window.open(winURL,"newWindow",winOutputSettings)
}
</script>
<form name="windowForm">
<p>URL (must type http:// before url)<input type="text" name="url"></p>
<br>
<br>
Desired Screen Width (x)<input type="text" name="screenwidth">
Desired Screen Height (y)<input type="text" name="screenheight">
<br>
<br>
Screen Position Width (x)<input type="text" name="positionwidth">
Screen Position Height (y)<input type="text" name="positionheight">
<br>
<br>
<input type="button" value=http://www.webdeveloper.com/forum/archive/index.php/"Change Window!" name="myButton" onClick="changeWindow()">
</form>
</body>
</html>
 
Back
Top