PHP + Ajax Progress Indicator?
I'm coding something in PHP, I'm just using Ajax for the styling. basically I am creating a form of searching for something on a site that isn't mine. I'm not sure if the steps I'm using is going to take long or if it will be instant, but in any开发者_如何学编程 case I would love a step/progress indicator. Is there a tutorial or link someone can give me to direct me to the right place I should look?
Basically something like this
Searching Threads on Page 1 (Step 1/5)
Opening Threads on Page 1 (Step 2/5)
Reading all images in all threads on page 1 (Step 3/5)
Etc. Etc. Just something visual so the person knows its working.
If you are using jQuery you can use Progressbar (http://docs.jquery.com/UI/Progressbar).
As the demo shows, you can call the method progressbar() on the jQuery dom object, like so:
$("#progressbar").progressbar({ value: 37 });
So, you would have a javascript function that makes an ajax request to your php page that indicates what step is in progress and use the return value as a parameter in the progressbar() call.
精彩评论