Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello I have been trying to upl

Status
Not open for further replies.

Huitzilopochtli

Programmer
Feb 18, 2002
81
DE
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=&quot;bar&quot;>
<TABLE style=&quot;color:red;&quot; HEIGHT=&quot;16&quot; Border=0><TR>
<div id=&quot;ProgBar&quot; style=&quot;font-family:Verdana; font-size=9pt;&quot;>Progress:<BR>
<TD BGCOLOR=RED ID=statuspic></TD>
</div>
<TD>
<div id=&quot;perctshow&quot; style=&quot;font-family:Verdana; font-size=9pt;&quot;></div>
</TD>
</TR></TABLE>
</DIV>
<BR>

<script language=&quot;Javascript&quot;>var progBarWidth=250;</script>
<%
iProcessedSoFar = 0
iTotalRecords = 5000

strHTML=&quot; <Table width=&quot;&quot;80%&quot;&quot; border=0><TR><TD Width=&quot;&quot;100%&quot;&quot; BGCOLOR=&quot;&quot;gray&quot;&quot; align=&quot;&quot;CENTER&quot;&quot;>Results:<td></tr>&quot;

for i = 0 to iTotalRecords
' next few lines are just a surrogate for whatever your processing function to be timed
strHTML = strHTML & &quot;<tr width=&quot;&quot;100%&quot;&quot;><td width=&quot;&quot;100%&quot;&quot; BGCOLOR=&quot;&quot;#FFCC66&quot;&quot;> Your results</td></tr>&quot;
iProcessedSoFar = iProcessedSoFar + 1
pctComplete = (iProcessedSoFar / iTotalRecords)
perc = (iProcessedSoFar / iTotalRecords) * 100
if i mod 8 = 0 then
ShowProgress pctComplete
end if
next

FinishProgress
strHTML=strHTML & &quot;</TABLE>&quot;
'Response.write strHTML

Sub ShowProgress(nPctComplete)
Response.Write &quot;<SCR&quot; & &quot;IPT LANGUAGE=&quot;&quot;JavaScript&quot;&quot;>&quot; & vbCrlf
Response.Write &quot;statuspic.width = Math.ceil(&quot; & nPctComplete & &quot; * progBarWidth);&quot; & vbCrlf
Response.Write &quot;perctshow.innerText = '&quot; & perc & &quot;%';&quot;
Response.Write &quot;</SCR&quot; & &quot;IPT>&quot;
End Sub

Sub FinishProgress
Response.Write &quot;<SCR&quot; & &quot;IPT LANGUAGE=&quot;&quot;JavaScript&quot;&quot;>&quot; & vbCrlf
'Response.Write &quot;ProgBar.style.visibility ='hidden';&quot; & vbCrLf
'Response.Write &quot;perctshow.style.visibility ='hidden';&quot; & vbCrLf
Response.Write &quot;bar.style.visibility ='hidden';&quot; & vbCrLf
Response.Write &quot;</SCR&quot; & &quot;IPT>&quot;
end sub

%>

<!-- Step Four: you can uncomment &quot;strHTML&quot; 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



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top