Timed Using ASP and HTML Meta TAGS to make A Dynamic Delay message
This is a little trick to display a timed message to the user after doing some sort of task. by mixing
Some creative ASP with a simple HTML META-Refresh You can display a-a user for a specified
Period of time and then redirect them back to wherever you want.
META tags with a http-equiv attribute are equivalent to HTTP headers. Usually, they control the action of
browsers, and May is used to refine the information provided by the actual headers.
Here are how it works.
After completing some sort of ASP code. (possibly a database update).
You can redirect the "user like" to the delay page.
Turn on buffering because and you'll probably need it depending on the where in the your page you redirect.
Put this in the top of your page before the <HTML> Tag.
<% Response.Buffer = True%>
Then when your are ready to send the "user to the" delay page do something like this.
<% mymessage = Server.URLEncode ("Adding New Product .... Please wait ")%>
<% Response.Redirect ("Delay.asp? Delay_time=3&delay_message= "& Mymessage &" &redirect_url=default.asp ")%>
As you can be there are 3 variables we send to the delay page.
Delay_time
Redirect_url
Delay_message
Then The delay.asp page would consist of the following code.
<%@ language= "VBSCRIPT"%>
<%
Delay_time = Request ("Delay_time")
Redirect_url = Request ("Redirect_url")
Delay_message = Request ("Delay_message")
%>
<meta http-equiv= "Refresh" content= "<% =delay_time%>; url=<% =redirect_url%> ">
<title>Delay</title>
<body color= "#FFFFFF" >
<font face= "Arial" ><p align = "center" ><strong><% =delay_message </font>
</body>