DelphiFAQ Home Search:

Show an HTML message box that disappears after 2 seconds


comments6 comments. Current rating: 5 stars (1 votes). Leave comments and/ or rate it.


I need to show an HTML message box that disappears after 2 seconds.
It does not need to be a popup window.


Simply display a centered HTML table with a button that says 'please click'.
You can also do an automatic redirect after 3 seconds as shown below.
The sample code uses the setTimeout() function which will call the redirecting javascript function after 3000 milliseconds.

<table border=4 cellspacing=0 cellpadding=20>
<tr><td bgcolor=silver align=center>

<p>The configuration is being updated.</p>

<form id=frm1 name=frm1 action="main.cgi" method=post>
<input type=hidden name=action value="detail">
<input type=submit id=btnSubmit name=btnSubmit value="Please click to continue or wait 3 seconds" class=input>

<script type=text/javascript language="JavaScript">
function countdown() {

setTimeout("countdown()", 3000);




2009-12-08, 07:35:27
hi, can u please give me the code for html message box
2010-01-05, 05:12:17
to check html error program
2012-06-09, 08:09:05
585895959555959858585985895958595589588958858959598589595859855858955559585895959555959858585985895958 955895889588589595985895958598
2012-11-12, 05:03:41
coach001 from United States  
2012-12-20, 01:08:31
[hidden] from New Delhi, India  
2017-11-27, 19:53:54
anonymous from Indonesia  



NEW: Optional: Register   Login
Email address (not necessary):

Rate as
Hide my email when showing my comment.
Please notify me once a day about new comments on this topic.
Please provide a valid email address if you select this option, or post under a registered account.

Show city and country
Show country only
Hide my location
You can mark text as 'quoted' by putting [quote] .. [/quote] around it.
Please type in the code:

Please do not post inappropriate pictures. Inappropriate pictures include pictures of minors and nudity.
The owner of this web site reserves the right to delete such material.

photo Add a picture: