开发者网络 动网主机 支持论坛 邮局 帮助
当前位置:网络学院ASP技术ASP技巧 → 用HTML META标签和ASP来作定时迟时信息
用HTML META标签和ASP来作定时迟时信息
日期:2000年11月15日 作者: 人气:     [ ]
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 message to a user for a specified
period of time and then redirect them back to wherever you want.

META tags with an HTTP-EQUIV attribute are equivalent to HTTP headers. Usually, they control the action of
browsers, and may be used to refine the information provided by the actual headers.

Here is how it works.

After completing some sort of ASP code. ( Possibly a database update ).

You can redirect the user like so to the delay page.

First, turn on buffering because you'll probably need it depending on where in your page you redirect.

Put this at the top of your page before the <HTML> Tag.
<% Response.Buffer = True %>

Then when you 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 see can see 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")
%>
<html>

<head>
<meta http-equiv="Refresh" content="<% =DELAY_TIME %>; URL=<% =REDIRECT_URL %>">
<title>Delay</title>
</head>

<body color="#FFFFFF">

<font face="Arial"><p align = "center"><strong><% =DELAY_MESSAGE %></strong></p></font>

</body>
</html>

(出处:)

相关文章:
 
·在不支持FSO的服务器上使用XMLDOM创建HTML文件
·超长字符的智能分页-支持HTML
·邮件发送类,支持HTML格式,支持优先级设置
·发送带附件的HTML格式邮件例程可以带附件
·用DHTML来模拟实现下拉菜单
·把HTML表单提交的数据转化成XML文件
·ASP.NET: HtmlEncode/UrlEncode
·巧用ASP技术保护DHTML源代码
·怎么在html中include一个文件内容
·用HTML格式发送邮件
相关软件:
 
·断剑下载系统HTML v1.0(全功能无限制版)
·思高网站HTML生成器ClassMakeHtm v1.0
·50507 HTML在线编辑器
·慧美图小偷系统(生成静态HTML首页)
·厦门人家网摘天下生成HTML加强安全版
·第八资讯网上网导航 v2.0(生成html)
·鸿运电脑公司程序生成html完全版
·Ce-Admin 新闻发布系统.html v1.0
·普克创业投资网生成html友情链接系统
·红土飞扬电信数据ASP生成HTML的树型论坛 v1.0
说明:本站部分内容收集于网络,如有侵犯您的权益请来信告知,我们会第一时间进行处理,谢谢
 → 特别推荐
 → 热点TOP10

关于本站 | 诚聘英才 | 业务合作 | 联系我们 | 广告合作 | 收藏本站

海口动网先锋网络科技有限公司版权所有
Copyright ? 2000 - 2003 AspSky.Net
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077