View Single Post
Old 03-30-2009, 03:09 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,168
Thanks: 59
Thanked 3,992 Times in 3,961 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Would appreciate it if you wouldn't send private messages to many people until you've waited a reasonable time for an answer in the forums. No, 2 hours is not a "reasonable time". Depending on how active the forum is, maybe 12 hours to 2 days.

Anyway, same answer I gave you privately:

****************

I can't see why it would be that hard, depending on what backend technology you are using.

You'd need to be using a backend such as ASP or JSP that allows "session state". You would make *TWO* AJAX requests on the server. First, you'd initiate the data request. Then you'd make a request for the progress percentage. Two different "pages" that share the same session. The one fetching the data would need to store its progress in a session variable. The one getting the progress value would simply read that session variable and return the number to its caller. That caller would update the display and then (perhaps after waiting 1 to 5 seconds, depending on the expected data fetch time?) ask again for the progress.

If the two "pages" can't share session info, then they could share the info via a simple database table. The client could pass a guid, say, to both of them and the data grabber would store a record with that guid as the key value and the percentage progress as the data. Really the same thing as sharing the session, just done ad hoc instead of via the builtin mechanisms.
*******************

Never done this, but can't see that it would be that hard.
Old Pedant is offline   Reply With Quote