JavaScripts
Close Window
Grizzly WebMaster home
 Grizzly WebMaster (HOME) >> JavaScripts >> Close Window
You know those funny little "Close Window" buttons that some popup windows use.  This is a REAL simple script.  We have provided two versions.

See this script in action.


<!--
    The one thing that is unique concerning both of these scripts
    is that we need to make sure that we are closing the "top" window.
    
    You could also use the the following link with an image instead
    of the text string.
-->
<p><a href="javascript:top.close()">Close Window</a></p>

<!--
    The form button implementation ties into the "onclick" event.
-->
<form>
  <input type="button" onclick="top.close()" value="Close Window" name="button1">
</form>
Service Provided by Bear Consulting Group Last modified: 25 May 2009
Copyright 2001 Bear Consulting Group