aspupload文件重命名及上傳進度條的解決方法附代碼第2/2頁
更新時間:2007年08月10日 18:59:01 作者:
bar.asp
復制代碼 代碼如下:
<%
Response.Expires = -1
PID = Request("PID")
TimeO = Request("to")
Set UploadProgress = Server.CreateObject("Persits.UploadProgress")
format = "<br><CENTER><b>正在上傳,請耐心等待...</b></CENTER><br>%T%t%B3%T 速度:(%S/秒) 估計剩余時間:%R %r%U / %V(%P)%l%t"
bar_content = UploadProgress.FormatProgress(PID, TimeO, "#00007F", format)
If "" = bar_content Then
%>
<HTML>
<HEAD>
<TITLE>Upload Finished</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function CloseMe()
{
window.parent.close();
return true;
}
</SCRIPT>
</HEAD>
<BODY OnLoad="CloseMe()" BGCOLOR="menu">
</BODY>
</HTML>
<%
Else ' Not finished yet
%>
<HTML>
<HEAD>
<meta HTTP-EQUIV="Refresh" CONTENT="1;URL=<%
Response.Write Request.ServerVariables("URL")
Response.Write "?to=" & TimeO & "&PID=" & PID %>">
<TITLE>Uploading Files...</TITLE>
<style type="text/css">
body,td {font-family:Tahoma; font-size: 8pt }
td.spread {font-size: 6pt; line-height:6pt }
td.brick {font-size:6pt; height:12px}
</style>
</HEAD>
<BODY BGCOLOR="menu" topmargin=0>
<% = bar_content %>
</BODY>
</HTML>
<% End If %>
framebar.asp
復制代碼 代碼如下:
<%@EnableSessionState=False%>
<% Response.Expires = -1 %>
<title>正在上傳--</title>
<style type='text/css'>td {font-family:Tahoma; font-size: 8pt }</style>
<BODY BGCOLOR="menu" scroll="NO" frameborder="NO" status="no" style="border:0px;">
<script language="JavaScript">
<!--
function Stopupload()
{
if (typeof(window.opener)!="undefined"){
try{
window.opener.document.execCommand("stop");
}
catch(e){}
}
else if(typeof(window.dialogArguments)!="undefined"){
try{
window.dialogArguments.document.execCommand("stop");
}
catch(e){}
}
window.close();
}
//-->
</script>
<IFRAME src="bar.asp?PID=<%= Request("PID") & "&to=" & Request("to") %>" title="Uploading" noresize scrolling=no
frameborder=0 framespacing=10 width=369 height=115></IFRAME>
<TABLE BORDER="0" WIDTH="100%" cellpadding="2" cellspacing="0">
<TR><TD ALIGN="center"><button onclick="Stopupload()" style="font-size:12px;">取消上傳</button>
</TD></TR>
</TABLE>
</BODY>
</HTML>
相關文章
asp頁面提示Response 對象 錯誤 ASP 0156 : 80004005 HTTP 頭錯誤
訪問asp頁面時提示Response 對象 錯誤 ASP 0156 : 80004005 HTTP 頭錯誤?,行 0 已將 HTTP 頭輸出到客戶端瀏覽器。任何對 HTTP 頭的修改都必須在輸出頁內容之前進行。2011-09-09asp取動態(tài)表單中數(shù)據(jù)并寫入xml文件,用xsl顯示
asp取動態(tài)表單中數(shù)據(jù)并寫入xml文件,用xsl顯示...2006-09-09asp下request.querystring("id")與request("id&quo
一下問題一天遇到2次,復制過來以供下次參考,一般來說還使用萬能的request("id")比較好2008-01-01asp中利用CSW中文分詞組件來實現(xiàn)自己網(wǎng)站的內容關鍵詞自動提取
asp中利用CSW中文分詞組件來實現(xiàn)自己網(wǎng)站的內容關鍵詞自動提取...2007-03-03如何在 Access 2003 和 Access 2002 中創(chuàng)建 DSN 的連接到 SQLServer 對鏈接表
如何在 Access 2003 和 Access 2002 中創(chuàng)建 DSN 的連接到 SQLServer 對鏈接表...2006-10-10Asp中Server.ScriptTimeOut屬性需要注意的一點分析
Server.ScriptTimeout 這個屬性給定Asp腳本執(zhí)行的最大時間,如果asp程序的運行時間超過了這個屬性規(guī)定的值,Asp就會報錯。2011-06-06asp中去除內容HTML標簽的三個function函數(shù)
asp中去除內容HTML標簽的三個function函數(shù)...2007-03-03