I have an AJAX form, and its PHP process time is between 30 seconds to 2-3 minutes. I want to add some kind of progress bar, to show the user indication of how many % already ended.
The first thing I thought is using onreadystatechange to increase the element, but it changes at the beginning and right before the PHP returning the results.
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
I don't think you can get an accurate % progress (if at all). You will never know beforehand how long an HTTP request will be processed by the server. Why not just put a "Loading..." status message?
I don't think you can get an accurate % progress (if at all). You will never know beforehand how long an HTTP request will be processed by the server. Why not just put a "Loading..." status message?
That's what I'm doing now, but I wanted to try a progress bar.
Maybe I'll stick with the "loading" message.