I am trying to create a new window from which the original page can
close that new window. For some reason the following code will not
work. Passing the window.open command to a variable called myWindow
does not work with the mouse event, but it seems to work fine with a
javascript: URL command. I would prefer to do it with the mouse event.
Please assist. I can not find any documentation for this in any of my
books.
<!-- Code begins -->
<html>
<body>
<a href="#" onMouseDown="var myWindow=window.open('text.html',
'bobby', 'width=200, height=200');">Open</a>.
<a href="#" onMouseDown="myWindow.close();">Close</a>.
</body>
</html>
<!-- Code ends -->