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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Progress bar troubles

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
I thought a progress bar would be quite easy to do but am having some problems. The idea was to calculate the percentage at the end of each loop then use some javascript to jump to cause another frame in the browser (in this case called bottom) to re-load. The page would receive a parameter and this would decide what % width the table is.

The only problem I have is that even though I can see in the status bar that the bottom frame is having data sent to it at the end of each loop and I can see the % in the URL is going up it is only right at the end once the ASP has finished that the progres bar updates. So it starts at 0 then jumps straight to 100% at the end with nothing inbetween.

Is there any way round this? I have tried using META refresh on the progress frame to 1 second but that didn't seem to work either.

eg:

<%

'Make sure data is passed back to the client on a regular basis
Response.Buffer = False

For i=1 to counter

...

PercentComplete=int(i/counter)*100

%>
<script>window.open('enumerateprogress.asp?PercentComplete=<% = PercentComplete %>','bottom')</script>
<%

Next

and on enumerateprogress.asp

<table width="100%" border="2">
<tr>
<td>
<table border="0" width="<% = Request.QueryString("PercentComplete") %>">
<tr><td bgcolor="red">&nbsp;</td></tr>
</table>

</td>
</tr>
</table>

<% Response.Write(Request.QueryString("PercentComplete")) %>
 
Just guessing: try a
Code:
Response.Flush
before the Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top