Click here to Skip to main content
15,881,693 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
I have a page when it starts loading, it will perform in a long time process!
So, the Page is empty during this time.
I want to add a Processing Message (or a progress-bar)
How can I add a Jquery UI progress bar?
Thank You
Posted
Updated 9-Oct-12 3:33am
v3

To display a proper progress bar, you need to know how far through (percentage complete) your process is and report back this figure so that the client can update it's bar.

This can be quite complex - for example, if you are calling a database procedure that can take some time, how do you know how far the db operation is and how long it would take to complete? (it's possible, just difficult!)

In these situations, you might find it easier just to display a 'please wait' animated gif[^]. It's a lot simplier and is a recognised way of letting the client know that the operation might take some time.
 
Share this answer
 
Comments
ujju.1 10-Oct-12 2:43am    
thanx Dylan...that 'percentage complete' was a bit time taking...i did it using the second option i.e "please wait" animation. :)
I think in the following way to implement progress bar notifications on client screen for long running task on server .

1) create a separate task for your required work, could be a threaded work or on a web service.
2) implement jQuery Ajax to call that threaded work item/web service method to run a function.
3)using jQuery functions, refresh client UI with proper message.

There could be option to show task completed in percentage if you have qualitative work to do else you can simply show progress instead of percentage.

I hope it would be helpful.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900