progress bar or guage bar

Discussion in 'ASP General' started by Rob, Jul 11, 2003.

  1. Rob

    Rob Guest

    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
    Rob, Jul 11, 2003
    #1
    1. Advertising

  2. Rob

    Chris Barber Guest

    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.

    "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    news:u7CiJg$...
    > Depends on what for.... but basically, nope. ASP is redered in whole at

    the
    > server and the HTML if flushed down stream. Personally.....go with an
    > animated GIF and hide/show it.
    > See http://www.darkfalz.com/1058
    >
    > --
    > ----------------------------------------------------------
    > Curt Christianson (Software_AT_Darkfalz.Com)
    > Owner/Lead Designer, DF-Software
    > http://www.Darkfalz.com
    > ---------------------------------------------------------
    > ..Offering free scripts & code snippits for everyone...
    > ---------------------------------------------------------
    >
    > "Rob" <> wrote in message
    > news:ben4if$iu8$...
    > > 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
    > >
    > >

    >
    >
    Chris Barber, Jul 12, 2003
    #2
    1. Advertising

  3. Rob

    Tim Williams Guest

    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.



    "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    news:...
    > It's really nothing much different then the link I posted. It's still not

    an
    > accurate percentage and is only a kludge with the same result. Would you
    > rather have an inaccurate reading or a simple animation/message indicating
    > it's still processing?
    >
    > --
    > ----------------------------------------------------------
    > Curt Christianson (Software_AT_Darkfalz.Com)
    > Owner/Lead Designer, DF-Software
    > http://www.Darkfalz.com
    > ---------------------------------------------------------
    > ..Offering free scripts & code snippits for everyone...
    > ---------------------------------------------------------
    >
    > "Chris Barber" <> wrote in message
    > news:...
    > > 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.
    > >
    > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > news:u7CiJg$...
    > > > Depends on what for.... but basically, nope. ASP is redered in whole

    at
    > > the
    > > > server and the HTML if flushed down stream. Personally.....go with an
    > > > animated GIF and hide/show it.
    > > > See http://www.darkfalz.com/1058
    > > >
    > > > --
    > > > ----------------------------------------------------------
    > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > Owner/Lead Designer, DF-Software
    > > > http://www.Darkfalz.com
    > > > ---------------------------------------------------------
    > > > ..Offering free scripts & code snippits for everyone...
    > > > ---------------------------------------------------------
    > > >
    > > > "Rob" <> wrote in message
    > > > news:ben4if$iu8$...
    > > > > 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
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Tim Williams, Jul 12, 2003
    #3
  4. Rob

    Tim Williams Guest

    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


    "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    news:...
    > rare instance, but true.
    > I would think the overhead of Write, Flush would outweight the benefit,

    plus
    > it would be too fast to notice most likely...
    >
    > --
    > ----------------------------------------------------------
    > Curt Christianson (Software_AT_Darkfalz.Com)
    > Owner/Lead Designer, DF-Software
    > http://www.Darkfalz.com
    > ---------------------------------------------------------
    > ..Offering free scripts & code snippits for everyone...
    > ---------------------------------------------------------
    >
    > "Tim Williams" <> wrote in message
    > news:...
    > > 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.
    > >
    > >
    > >
    > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > news:...
    > > > It's really nothing much different then the link I posted. It's still

    > not
    > > an
    > > > accurate percentage and is only a kludge with the same result. Would

    you
    > > > rather have an inaccurate reading or a simple animation/message

    > indicating
    > > > it's still processing?
    > > >
    > > > --
    > > > ----------------------------------------------------------
    > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > Owner/Lead Designer, DF-Software
    > > > http://www.Darkfalz.com
    > > > ---------------------------------------------------------
    > > > ..Offering free scripts & code snippits for everyone...
    > > > ---------------------------------------------------------
    > > >
    > > > "Chris Barber" <> wrote in message
    > > > news:...
    > > > > 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.
    > > > >
    > > > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > > > news:u7CiJg$...
    > > > > > Depends on what for.... but basically, nope. ASP is redered in

    whole
    > > at
    > > > > the
    > > > > > server and the HTML if flushed down stream. Personally.....go with

    > an
    > > > > > animated GIF and hide/show it.
    > > > > > See http://www.darkfalz.com/1058
    > > > > >
    > > > > > --
    > > > > > ----------------------------------------------------------
    > > > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > > > Owner/Lead Designer, DF-Software
    > > > > > http://www.Darkfalz.com
    > > > > > ---------------------------------------------------------
    > > > > > ..Offering free scripts & code snippits for everyone...
    > > > > > ---------------------------------------------------------
    > > > > >
    > > > > > "Rob" <> wrote in message
    > > > > > news:ben4if$iu8$...
    > > > > > > 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
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Tim Williams, Jul 12, 2003
    #4
  5. Rob

    Chris Barber Guest

    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.

    "Tim Williams" <> wrote in message
    news:...
    > 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
    >
    >
    > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > news:...
    > > rare instance, but true.
    > > I would think the overhead of Write, Flush would outweight the benefit,

    > plus
    > > it would be too fast to notice most likely...
    > >
    > > --
    > > ----------------------------------------------------------
    > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > Owner/Lead Designer, DF-Software
    > > http://www.Darkfalz.com
    > > ---------------------------------------------------------
    > > ..Offering free scripts & code snippits for everyone...
    > > ---------------------------------------------------------
    > >
    > > "Tim Williams" <> wrote in message
    > > news:...
    > > > 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.
    > > >
    > > >
    > > >
    > > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > > news:...
    > > > > It's really nothing much different then the link I posted. It's

    still
    > > not
    > > > an
    > > > > accurate percentage and is only a kludge with the same result. Would

    > you
    > > > > rather have an inaccurate reading or a simple animation/message

    > > indicating
    > > > > it's still processing?
    > > > >
    > > > > --
    > > > > ----------------------------------------------------------
    > > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > > Owner/Lead Designer, DF-Software
    > > > > http://www.Darkfalz.com
    > > > > ---------------------------------------------------------
    > > > > ..Offering free scripts & code snippits for everyone...
    > > > > ---------------------------------------------------------
    > > > >
    > > > > "Chris Barber" <> wrote in message
    > > > > news:...
    > > > > > 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.
    > > > > >
    > > > > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > > > > news:u7CiJg$...
    > > > > > > Depends on what for.... but basically, nope. ASP is redered in

    > whole
    > > > at
    > > > > > the
    > > > > > > server and the HTML if flushed down stream. Personally.....go

    with
    > > an
    > > > > > > animated GIF and hide/show it.
    > > > > > > See http://www.darkfalz.com/1058
    > > > > > >
    > > > > > > --
    > > > > > > ----------------------------------------------------------
    > > > > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > > > > Owner/Lead Designer, DF-Software
    > > > > > > http://www.Darkfalz.com
    > > > > > > ---------------------------------------------------------
    > > > > > > ..Offering free scripts & code snippits for everyone...
    > > > > > > ---------------------------------------------------------
    > > > > > >
    > > > > > > "Rob" <> wrote in message
    > > > > > > news:ben4if$iu8$...
    > > > > > > > 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
    > > > > > > >
    > > > > > > >
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Chris Barber, Jul 12, 2003
    #5
  6. Rob

    Chris Barber Guest

    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.

    "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    news:...
    > not to mention that there seems to be almost a "standard" of animation as

    a
    > wait indicator in web programming.
    >
    > --
    > ----------------------------------------------------------
    > Curt Christianson (Software_AT_Darkfalz.Com)
    > Owner/Lead Designer, DF-Software
    > http://www.Darkfalz.com
    > ---------------------------------------------------------
    > ..Offering free scripts & code snippits for everyone...
    > ---------------------------------------------------------
    >
    > "Tim Williams" <> wrote in message
    > news:...
    > > 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
    > >
    > >
    > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > news:...
    > > > rare instance, but true.
    > > > I would think the overhead of Write, Flush would outweight the

    benefit,
    > > plus
    > > > it would be too fast to notice most likely...
    > > >
    > > > --
    > > > ----------------------------------------------------------
    > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > Owner/Lead Designer, DF-Software
    > > > http://www.Darkfalz.com
    > > > ---------------------------------------------------------
    > > > ..Offering free scripts & code snippits for everyone...
    > > > ---------------------------------------------------------
    > > >
    > > > "Tim Williams" <> wrote in message
    > > > news:...
    > > > > 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.
    > > > >
    > > > >
    > > > >
    > > > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > > > news:...
    > > > > > It's really nothing much different then the link I posted. It's

    > still
    > > > not
    > > > > an
    > > > > > accurate percentage and is only a kludge with the same result.

    Would
    > > you
    > > > > > rather have an inaccurate reading or a simple animation/message
    > > > indicating
    > > > > > it's still processing?
    > > > > >
    > > > > > --
    > > > > > ----------------------------------------------------------
    > > > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > > > Owner/Lead Designer, DF-Software
    > > > > > http://www.Darkfalz.com
    > > > > > ---------------------------------------------------------
    > > > > > ..Offering free scripts & code snippits for everyone...
    > > > > > ---------------------------------------------------------
    > > > > >
    > > > > > "Chris Barber" <> wrote in message
    > > > > > news:...
    > > > > > > 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.
    > > > > > >
    > > > > > > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > > > > > news:u7CiJg$...
    > > > > > > > Depends on what for.... but basically, nope. ASP is redered in

    > > whole
    > > > > at
    > > > > > > the
    > > > > > > > server and the HTML if flushed down stream. Personally.....go

    > with
    > > > an
    > > > > > > > animated GIF and hide/show it.
    > > > > > > > See http://www.darkfalz.com/1058
    > > > > > > >
    > > > > > > > --
    > > > > > > > ----------------------------------------------------------
    > > > > > > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > > > > > > Owner/Lead Designer, DF-Software
    > > > > > > > http://www.Darkfalz.com
    > > > > > > > ---------------------------------------------------------
    > > > > > > > ..Offering free scripts & code snippits for everyone...
    > > > > > > > ---------------------------------------------------------
    > > > > > > >
    > > > > > > > "Rob" <> wrote in message
    > > > > > > > news:ben4if$iu8$...
    > > > > > > > > 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
    > > > > > > > >
    > > > > > > > >
    > > > > > > >
    > > > > > > >
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
    Chris Barber, Jul 12, 2003
    #6
  7. Rob

    Chris Barber Guest

    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 [MVP]" <Software_AT_Darkfalz.com> wrote in message
    news:...
    > 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 <%=sLocation%>" <7yasdf.com> wrote in
    > message news:#c5oW$...
    > > 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 [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > > news:%...
    > > > 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.
    > > >
    > > > --

    > >
    > >

    >
    >
    Chris Barber, Jul 12, 2003
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    0
    Views:
    3,524
  2. John Hann
    Replies:
    0
    Views:
    6,039
    John Hann
    Aug 21, 2004
  3. Charlie Zhang
    Replies:
    3
    Views:
    1,237
    Paul Lutus
    Aug 16, 2004
  4. Matt
    Replies:
    9
    Views:
    70,762
  5. Matt
    Replies:
    9
    Views:
    523
    kaeli
    Aug 23, 2004
Loading...

Share This Page