SEARCH
Newsletter
Subscribe to get design
tips, latest trends, free
stuff and more.
It doesn't look like an e-mail address

hosting

  Web Programming JavaScript Close Window

Close Window

Ghostbone.com JavaScript Dec 09, 2005

Close WindowAdd this nifty script to your pop up pages for the users to close them :). Six great styles that should work if done properly.

Closing a Regular Window from a Link


<a href="javascript:window.close()">Close</a>

Closing a Regular Window from an Image

<a href="javascript:window.close()">
<img border="0" src="/img_articles/6729/closingwindows.gif" width="95" height="46">
</a>

Closing a Regular Window from a Button

<form>
<input type="button" value="Close" onClick="window.close()">
</form>

Closing a Frameset Window from a Link

<a href="javascript:top.window.close()">Close</a>

Closing a Frameset Window from an Image

<a href="javascript:window.close()">
<img border="0" src="/img_articles/6729/closingwindows.gif" width="95" height="46">
</a>

Closing a Frameset Window from a Button

<form>
<input type="button" value="Close" onClick="top.window.close()">
</form>

   
subscribe to newsletter