Back to Scripts page
Click in the text area below, select all and copy to grab the script
Script listing:
<HTML> <HEAD> <TITLE>Window Test</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT"> <!-- Hide script from old browsers function openWindow() { newWindow = window.open('', 'newWin', 'toolbar=yes,location=yes,scrollbars=yes,width=300,height=200') } function closeWindow() { if (newWindow && !newWindow.closed) { newWindow.close() } } // End hiding script from old browsers --> </SCRIPT> </HEAD> <BODY BGCOLOR=WHITE> <CENTER> <H1>Let's play with windows!</H1> <H3><A HREF="javascript:openWindow()">Open a new window</A> <A HREF="javascript:closeWindow()">Close the window</A></H3> </CENTER> </BODY> </HTML>