Jump to content

Ajax Progress


-Karl-

Recommended Posts

So, I have a script in PHP which will grab usernames from a database, then, it will carry out a function for each of the usernames. Grab the data, then store it in a database.

 

I'm a complete noob with Ajax. But how could I utilize Ajax to show the progress. Such as if the database has 18 rows, it will display "1 out of 18", then "2 out of 18", and so on.

Link to comment
https://forums.phpfreaks.com/topic/201397-ajax-progress/
Share on other sites

  • 4 weeks later...

you could, first to you connect get all the rows, store that.start a different variable at 0, then each user you process just ++ that and then edit a div

<div id="hi"></div>

t= amount fo users

x= 0

function{

x++

do your user stuff what ever

 

document.getelementById('hi').innerHTML = x."/".t

}

 

If that makes sence ? I would make sure the spellings right if you copy and paste that ^]

hope it helps !

Link to comment
https://forums.phpfreaks.com/topic/201397-ajax-progress/#findComment-1068646
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.