Under these circumstances, one could use a AJAX based approach to notify the user of the progress, and auto-load it, once the data is ready.
The following steps need to be performed
- Make an asynchronous call to the server with the required parameters
- The server will respond back with a notification, and a couple of call-back functions, which holds a URL to check the progress of this particular task.
- CheckProgress()
- GetData()
- Wrap the CheckProgress() call-back function is a time-interval loop, and make further asynchronous requests to check the progress.
- The Server will respond with the percentage of work complete.
- Once the Server says, it’s complete, i.e. 100% completion, clear the time-interval loop.
- Make another call to the server, using the GetData() call-back function.
- This method will return the data, augmented with a function, which holds the controls to load this data at client-side.
No comments:
Post a Comment