Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-21-2007, 02:23 PM   PM User | #1
b_hole
Regular Coder

 
Join Date: Aug 2006
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
b_hole is an unknown quantity at this point
XMLHttpRequest progress

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
b_hole is offline   Reply With Quote
Old 02-21-2007, 10:23 PM   PM User | #2
glenngv
Supreme Master coder!


 
glenngv's Avatar
 
Join Date: Jun 2002
Location: Los Angeles, CA Original Location: Philippines
Posts: 10,241
Thanks: 0
Thanked 112 Times in 111 Posts
glenngv will become famous soon enough
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?
__________________
Glenn
_____________________________________________
Play Tower of Hanoi Android app (Ad-FREE!)
Play Tower of Hanoi Android app (FREE!)
Go to Tower of Hanoi Leaderboard
Play Tower of Hanoi Facebook app
glenngv is offline   Reply With Quote
Old 02-22-2007, 06:49 AM   PM User | #3
b_hole
Regular Coder

 
Join Date: Aug 2006
Posts: 135
Thanks: 0
Thanked 0 Times in 0 Posts
b_hole is an unknown quantity at this point
Quote:
Originally Posted by glenngv View Post
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.
b_hole is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:44 PM.


Advertisement
Log in to turn off these ads.