Here's what I am trying to do. I have a website that lets users submit requests that are queued up in a Jobs table that the service picks up and processes. I have a status column in the table that denotes whether the request is queued up for processing or being currenty processed by the service or the service has completed processing the request. The entire process takes a few minutes.
I have a Status ASP.NET page in which I will need to show the current status of their request on a real time basis. I want to display some kind of animation and denote the current status. One way I could do this is to have a meta http refresh every x seconds that checks the status of the request (I guess this is how sites such as Expedia, Priceline does it?)
I would like to prevent a complete page refresh is possible and looking for a AJAX/JQuery solution. How would I implement this? Is polling the correct approach?
Polling via AJAX is the easiest and simplest for your needs. If you know the upper and lower bounds on the time it will take then I'd probably just have the animation run for that length of time and then do something for the exceptional case.
Others have done the same:
See: http://news.ycombinator.com/item?id=946165 and http://www.chrisharrison.net/projects/progressbars/ProgBarHarrison.pdf
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With