|
|
 |
| 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 p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |
|

September 21st, 2004, 12:34 PM
|
|
Authorized User
|
|
Join Date: Jul 2004
Location: , , .
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, 12:54 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
|
|
There is an ActiveX control that you could use.
Brian
|

September 21st, 2004, 07:07 PM
|
|
Friend of Wrox
|
|
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,666
Thanks: 6
Thanked 9 Times in 9 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
Location: Houston, TX, USA.
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
Location: Sydney, NSW, Australia.
Posts: 1,666
Thanks: 6
Thanked 9 Times in 9 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
Location: Copenhagen, , Denmark.
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
Location: Houston, TX, USA.
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
Location: Copenhagen, , Denmark.
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
Location: Sydney, NSW, Australia.
Posts: 1,666
Thanks: 6
Thanked 9 Times in 9 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
Location: Copenhagen, , Denmark.
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.
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Progress Bar |
dotnetsathya |
VS.NET 2002/2003 |
0 |
September 26th, 2007 01:33 AM |
| Progress bar |
Poncho |
Pro VB 6 |
1 |
March 23rd, 2006 03:18 PM |
| Progress Bar |
jmss66 |
VB How-To |
4 |
December 27th, 2005 04:55 PM |
| Progress Bar |
BSkelding |
ASP.NET 1.0 and 1.1 Basics |
3 |
May 4th, 2004 05:12 AM |
| Progress Bar Help |
jacob_d_99 |
Javascript How-To |
1 |
November 20th, 2003 11:18 PM |
|
 |