Can anyone tell me how to get a number to update realtime on a site?
What I'm looking for is used on the following website:
New & Used Cars For Sale - Arnold Clark
The number with the top vehicle search update when a user makes any of the selections in the form.
I think I know how to get the number to update via php and mysql queries on the db but how can I get the effect where the number rolls to the newly updated total?
Any help very much appreciated, I'm in a bit of a fix with this one!!
You would use setInterval to occasionally run an ajax to request of a php page that provides the number, and on successful completion of the request you would then update that part of the page.
The Bulletproof Ajax book is the best resource I've found for learning how to do that.