Huitzilopochtli
Programmer
Hello
I have been trying to upload a very simple .asp file which shows how much of a file remains before download is complete. it's a "Progress.asp" file.
The code for the file is as follows:
<%
Response.Buffer = False
server.scriptTimeout =1000
%>
<HTML>
<HEAD>
</HEAD>
<BODY>
<div id="bar">
<TABLE style="color:red;" HEIGHT="16" Border=0><TR>
<div id="ProgBar" style="font-family:Verdana; font-size=9pt;">Progress:<BR>
<TD BGCOLOR=RED ID=statuspic></TD>
</div>
<TD>
<div id="perctshow" style="font-family:Verdana; font-size=9pt;"></div>
</TD>
</TR></TABLE>
</DIV>
<BR>
<script language="Javascript">var progBarWidth=250;</script>
<%
iProcessedSoFar = 0
iTotalRecords = 5000
strHTML=" <Table width=""80%"" border=0><TR><TD Width=""100%"" BGCOLOR=""gray"" align=""CENTER"">Results:<td></tr>"
for i = 0 to iTotalRecords
' next few lines are just a surrogate for whatever your processing function to be timed
strHTML = strHTML & "<tr width=""100%""><td width=""100%"" BGCOLOR=""#FFCC66""> Your results</td></tr>"
iProcessedSoFar = iProcessedSoFar + 1
pctComplete = (iProcessedSoFar / iTotalRecords)
perc = (iProcessedSoFar / iTotalRecords) * 100
if i mod 8 = 0 then
ShowProgress pctComplete
end if
next
FinishProgress
strHTML=strHTML & "</TABLE>"
'Response.write strHTML
Sub ShowProgress(nPctComplete)
Response.Write "<SCR" & "IPT LANGUAGE=""JavaScript"">" & vbCrlf
Response.Write "statuspic.width = Math.ceil(" & nPctComplete & " * progBarWidth);" & vbCrlf
Response.Write "perctshow.innerText = '" & perc & "%';"
Response.Write "</SCR" & "IPT>"
End Sub
Sub FinishProgress
Response.Write "<SCR" & "IPT LANGUAGE=""JavaScript"">" & vbCrlf
'Response.Write "ProgBar.style.visibility ='hidden';" & vbCrLf
'Response.Write "perctshow.style.visibility ='hidden';" & vbCrLf
Response.Write "bar.style.visibility ='hidden';" & vbCrLf
Response.Write "</SCR" & "IPT>"
end sub
%>
<!-- Step Four: you can uncomment "strHTML" to see results --->
</BODY>
</HTML>
I am getting the following message when I try to upload the page (to Brinkster).
Finishing File Upload Process...
Uploading File 1...progress.asp
--> Scanning File ...Error : Server.ScriptTimeout set too high.
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/FileManagerUploadFiles.asp, line 89
I would be grateful for any ideas about how I might correct the above error message.
Many thanks
I have been trying to upload a very simple .asp file which shows how much of a file remains before download is complete. it's a "Progress.asp" file.
The code for the file is as follows:
<%
Response.Buffer = False
server.scriptTimeout =1000
%>
<HTML>
<HEAD>
</HEAD>
<BODY>
<div id="bar">
<TABLE style="color:red;" HEIGHT="16" Border=0><TR>
<div id="ProgBar" style="font-family:Verdana; font-size=9pt;">Progress:<BR>
<TD BGCOLOR=RED ID=statuspic></TD>
</div>
<TD>
<div id="perctshow" style="font-family:Verdana; font-size=9pt;"></div>
</TD>
</TR></TABLE>
</DIV>
<BR>
<script language="Javascript">var progBarWidth=250;</script>
<%
iProcessedSoFar = 0
iTotalRecords = 5000
strHTML=" <Table width=""80%"" border=0><TR><TD Width=""100%"" BGCOLOR=""gray"" align=""CENTER"">Results:<td></tr>"
for i = 0 to iTotalRecords
' next few lines are just a surrogate for whatever your processing function to be timed
strHTML = strHTML & "<tr width=""100%""><td width=""100%"" BGCOLOR=""#FFCC66""> Your results</td></tr>"
iProcessedSoFar = iProcessedSoFar + 1
pctComplete = (iProcessedSoFar / iTotalRecords)
perc = (iProcessedSoFar / iTotalRecords) * 100
if i mod 8 = 0 then
ShowProgress pctComplete
end if
next
FinishProgress
strHTML=strHTML & "</TABLE>"
'Response.write strHTML
Sub ShowProgress(nPctComplete)
Response.Write "<SCR" & "IPT LANGUAGE=""JavaScript"">" & vbCrlf
Response.Write "statuspic.width = Math.ceil(" & nPctComplete & " * progBarWidth);" & vbCrlf
Response.Write "perctshow.innerText = '" & perc & "%';"
Response.Write "</SCR" & "IPT>"
End Sub
Sub FinishProgress
Response.Write "<SCR" & "IPT LANGUAGE=""JavaScript"">" & vbCrlf
'Response.Write "ProgBar.style.visibility ='hidden';" & vbCrLf
'Response.Write "perctshow.style.visibility ='hidden';" & vbCrLf
Response.Write "bar.style.visibility ='hidden';" & vbCrLf
Response.Write "</SCR" & "IPT>"
end sub
%>
<!-- Step Four: you can uncomment "strHTML" to see results --->
</BODY>
</HTML>
I am getting the following message when I try to upload the page (to Brinkster).
Finishing File Upload Process...
Uploading File 1...progress.asp
--> Scanning File ...Error : Server.ScriptTimeout set too high.
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/FileManagerUploadFiles.asp, line 89
I would be grateful for any ideas about how I might correct the above error message.
Many thanks