progress bar or guage bar

R

Rob

Hi all,

Is it possible to do a progress bar of gauge bar in asp? If possible could
someone show some sample code on it.

Many thanks,
Rob
 
C

Chris Barber

You can do a 'sort of' progress bar if you create a button (<INPUT
type="button"/>) and then as the page content loads use an embedded
Javascript to change the value (eg. text) of the button.
I think you have to set Response.Buffer = True and repeatedly call
Response.Flush after you write the JavaScript bit.

Chris.
 
T

Tim Williams

That depends on what you're doing....

If you have 100 submitted records to update on the server (and it might take
a while) then you can write out an update every ten records and flush it to
the client. That seems pretty accurate.

Tim.
 
T

Tim Williams

I agree that it's not always applicable, but can be useful in (rare)
circumstances, such as when having to conduct a relatively slow operation in
a loop.

As you note, if the response.write and flush are enough to significantly
slow down execution of the page then you probably don't need it.


tim
 
C

Chris Barber

I have used it to good effect in intranet applications where database
pre-processing may take up to 30 seconds to achieve (we're talking Stored
Procedures checking over 100s of millions of rows in batches of approx. 1
million - GPS positions for tracked vehicles) and I can tell you that users
get all ready to click like crazy unless you give them a % progress bar.

Chris.
 
C

Chris Barber

Well - yes but not for 'real' situations that warrant letting the user
actually know when something will finsh as opposed to saying 'It might
finish sometime or of course it could be hung with an error at the server
that I'm not going to tell you about'.
A classic good use of a progress bar is the Windows Update. That can take up
to a minute or more and it's nice to able to see the % (whether actual or
estimated) progress.

LoL.

Chris.
 
C

Chris Barber

Wisconsin eh! - I'll drop by on my way to Barbados in about 6 weeks - OK?

Now .. Wisconsin is about as far as London from Derbyshire (120 miles?) ...
wheres that Cubs map of the world gone now .... LoL.

Chris.

Curt_C said:
Sounds good to me.
Anytime someone is by the central Wisconsin area let me know.....heck, I'll
buy the first round. Johnny Walker Blue sound bout right? :}


--
----------------------------------------------------------
Curt Christianson (Software_AT_Darkfalz.Com)
Owner/Lead Designer, DF-Software
http://www.Darkfalz.com
---------------------------------------------------------
..Offering free scripts & code snippits for everyone...
---------------------------------------------------------

Ray at said:
Count me in for the next debate, although I'd prefer that it be over a
couple of beers. I designate Chris Barber to drive though. :]

Ray at home


Curt_C said:
hehehehehe.....
A good debate is hard to come by these days without tempers flaring...
I
do
so enjoy the little things :}

Your points are well made though and I do concede it's usefullness, just
wish it was easier to impliment accurately.

--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top