 |
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|

September 21st, 2004, 11:34 AM
|
Authorized User
|
|
Join Date: Jul 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
progress bar
hi does anybody know when you are uploading files, if there is a
way to show a progress bar as the file is being uploaded?
thanks!
|

September 21st, 2004, 11:54 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
There is an ActiveX control that you could use.
Brian
|

September 21st, 2004, 06:07 PM
|
Friend of Wrox
|
|
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
I will try and find the personsname who should recieve the credits from this, i did not create it. he following is cut n paste code
-----------------------start------
<%
Response.Buffer = False
Server.scriptTimeout = 250000
iProcessedSoFar = 0
iTotalRecords = 10000
%>
<HTML>
<HEAD>
<STYLE>
BODY { background-color:#FFFFFF; font-family:verdana; }
#progressBar { font-size:8pt; font:bold; border-style:solid; border-width:1px; border-color:#888888; padding:1px; text-align:center; }
#progbar { height:6px; }
</STYLE>
</HEAD>
<BODY>
<TABLE WIDTH='100%' HEIGHT='100%'>
<TR>
<TD ALIGN='middle' VALIGN='center'>
<SPAN ID='progressBar' STYLE='width:350px;'>
<TABLE STYLE='color:red;' CELLPADDING='0' CELLSPACING='0' BORDER='0'>
<TR>
<TD ID='progbar' BGCOLOR='red'></TD>
</TR>
</TABLE>
</SPAN>
</TD>
</TR>
</TABLE>
<script language="Javascript">var progBarWidth=350</script>
<%
for i = 0 to iTotalRecords
iProcessedSoFar = iProcessedSoFar + 1
pctComplete = (iProcessedSoFar/iTotalRecords)
ShowProgress 2, i, pctComplete
next
FinishProgress
Sub ShowProgress(frequency, i, nPctComplete)
if i mod frequency = 0 then
nPctComplete = Replace(CStr(nPctComplete), ",", ".")
Response.Write "<SCRIPT LANGUAGE='JavaScript'>progbar.style.width = Math.ceil(" & nPctComplete & " * progBarWidth);</SCRIPT>" & vbCrLf
End If
End Sub
Sub FinishProgress
Response.Write vbCrLf & "<SCRIPT LANGUAGE='JavaScript'>document.getElementById('pro gressBar').innerHTML = 'finished';</SCRIPT>"
End Sub
%>
</BODY>
</HTML>
-----------------------------end----------------
Wind is your friend
Matt
|

February 7th, 2005, 05:17 PM
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Hi, matt,
I keep seeing many people refer to this block for codes while need the progress bar, but I can't get is how it'll work in real case.
If you want to progress bar is there, at the same time, you are loading image, while you put the codes for loading image? because to let the progress bar work fine, you have to loop to keep siging value for the bar, here you use innerHTML, how about if I haven't innerhtml, just some function call?
Andraw
|

February 8th, 2005, 02:15 AM
|
Friend of Wrox
|
|
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
Andraw
Sorry I didnât completely understand your post, are you asking how to implement this? The creator didnât implement it, nor have I. He asked, if I do could I send him the link. My colleague used it for a heavy page load.
IMO if you need a progress bar for an image, the image is to heavy and needs to be looked at.
Wind is your friend
Matt
|

February 8th, 2005, 05:54 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Check out this thread...
http://p2p.wrox.com/topic.asp?TOPIC_ID=7507
...and perhaps this is the guy who should have the credits...
http://www.eggheadcafe.com/articles/20010610.asp
... however it doen't solve the upload-file-problem as far as i know. The problem using this method is that you have no method for getting information about the small increments in the upload.
The solution is based on the fact you know how long the task is and then chopping it up and showing the progress as these small increments have occured.
An example can be checked out here. I have used this progress bar on a site where the administrator can check for dead links stored in a database. I know how many links to check, and I know when I have checked one link, and therefore I can use this method.
Hope it helps :)
Jacob.
|

February 8th, 2005, 10:11 AM
|
Friend of Wrox
|
|
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks both of you's reply!
Sorry if I didn't explain my question very well.
I have a heavy page that will call a activex control to generate a word report, it will take about one minute. because to make the progress bar works fine, you have to keep looping. I just don't know where I will put the following code to make the both work together:
<OBJECT ID = WORDREPORT......>
WORDREPORT.InitializeData
WORDREPORT.GenerateRpt
these two call take some time.
Andraw
|

February 8th, 2005, 10:58 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
As I see it, thats exactly the problem. You have a command, which takes a lot of time, but no increments. You do not do some task 100 times, you have one task that takes a long time to finish.
The problem with this progress bar is that you have to have these small tasks.
Jacob.
|

February 9th, 2005, 01:32 AM
|
Friend of Wrox
|
|
Join Date: Jan 2004
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
|
|
jacob
;;;...and perhaps this is the guy how should have the credits...
You obviously didnt read this whole post. What are you on about, I even mentioned it?
Wind is your friend
Matt
|

February 9th, 2005, 08:15 AM
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 440
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Quote:
quote:Originally posted by mat41
jacob
;;;...and perhaps this is the guy how should have the credits...
You obviously didnt read this whole post. What are you on about, I even mentioned it?
|
Sorry mat41, I don't understand? Did I do anything wrong?
Jacob.
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Progress Bar |
jmss66 |
VB How-To |
6 |
December 16th, 2009 10:25 PM |
Progress Bar |
dotnetsathya |
VS.NET 2002/2003 |
0 |
September 26th, 2007 12:33 AM |
Progress bar |
Poncho |
Pro VB 6 |
1 |
March 23rd, 2006 03:18 PM |
Progress Bar |
BSkelding |
ASP.NET 1.0 and 1.1 Basics |
3 |
May 4th, 2004 04:12 AM |
Progress Bar Help |
jacob_d_99 |
Javascript How-To |
1 |
November 20th, 2003 11:18 PM |
|
 |