Open New Window.Close Current Window

[Total: 0    Average: 0/5]

This shows how to have the current window open up a new window and close the current one.

Body Code:

<script type=text/javascript>
var newWin = null;
function openIt() {
  newWin = window.open();
}
function closeThis(){
  window.close()
}
function doIt() {
  openIt();
  setTimeout("closeThis();",1000);
}
</script>
<a href="javascript:doIt()">Click Me</a>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *