...

View Full Version : XMLHttpRequest progress



b_hole
02-21-2007, 02:23 PM
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.

Is there other way to find the % of the progress?

Thanks a lot :)

glenngv
02-21-2007, 10:23 PM
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?

b_hole
02-22-2007, 06:49 AM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum