Use HTML meta tags and ASP to make timed late information

Source: Internet
Author: User
Tags sort
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>



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.