开发者

PHP + Ajax Progress Indicator?

开发者 https://www.devze.com 2022-12-19 00:18 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消