<script src="MyScripts.js" ></script>
myWindow = window.open("lesson6.html", "MyNewWindow", "left=10,top=40,width=200,height=400,titlebar=yes,toolbar=no");
myWindow = window.open("", "MyNewWindow",
"left=10,top=40,width=200,height=400,titlebar=yes,toolbar=no");
Now we can check that it opened:
if (!myWindow) alert("Window failed to open!");
Work with its document object:
myWindow.document.write("
move/resize the window:
myWindow.moveTo(200,200); myWindow.resizeTo(400,200);
Or close it:
if (myWindow) myWindow.close();
Note the 'if' to protect against the case where the window was never created.
aeroplane = document.getElementById('plane');
aeroplane.style.left = 200;