Manage Learn to apply best practices and optimize your operations.

JavaScript autoclose window

Here's how to make an HTML page close itself automatically after x milliseconds.

Here's how to make an HTML page close itself automatically after x milliseconds.

  
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 
Transitional//EN"> <HTML> <HEAD> 
<TITLE> New Document </TITLE> </HEAD>

<script language=javascript>
function closemyself() {
 window.opener=self;
 window.close();
 //self.close();
}
</script>

<BODY background="vwConfig/Image1/$File/bg-logo.gif" 
onLoad="setTimeout('closemyself()',2000);" >

<table border="0">
 <tr>
  <td>
   <img src="vwConfig/Image1/$File/homepage-logo2.gif"> 
  </td>
 </tr>
</table>
<p>  </p>
<table border="0" width="100%">
 <tr>
  <td align="center"><font color=#330066 
size="4"><strong>
   Thank you for something</strong></font>
  </td>
 </tr>
 <tr>
  <td align="center">
    
  </td>
 </tr>
 <tr>
  <td align="center"><font color=#330066>
   (This window will close automatically)</font>
  </td>
 </tr>
</table>

</BODY>
</HTML> 

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip exchange by member Gary Cronin. Please let others know how useful it is via the rating scale below. Do you have a useful Notes/Domino tip or code to share? Submit it to our monthly tip contest and you could win a prize and a spot in our Hall of Fame.

Dig Deeper on JavaScript for Lotus Notes Domino

SearchWindowsServer

Search400

  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/Search400.com community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury

SearchDataCenter

SearchContentManagement

Close