Opening and Closing Windows in VBScript



The close window method appears to function properly when the close function is declared in a document by itself. Unusual !

<HEAD>

<SCRIPT LANGUAGE="VBScript">
<!--
	Sub btnOpen_onclick
		open "http://www.yahoo.com", "anotherWindow", "toolbar=no, menubar=no, width=640, height=480"
	End Sub

	Sub btnClose_onclick
		close
	End Sub
-->
</SCRIPT>

</HEAD>

<BODY>

<FORM>
	<INPUT TYPE="button" ID="btnOpen" VALUE="Open a Window">
	<INPUT TYPE="button" ID="btnClose" VALUE="Close that Window">
</FORM>