AJAX - The Complete Reference

(avery) #1

346 Part II: Developing an Ajax Library^


This is but a mere outline of the necessary code needed. A full example can be found at
http://ajaxref.com/ch8/fileuploadprogress.html and is shown in Figure 8-4.
For large Ajax-based responses, we may also want to keep the user informed of the
progress beyond letting them stare at a hopefully mesmerizing animation. In some browsers,
it is possible to look at partial data responses as discussed at the end of Chapter 3. For
example, using Firefox’s onprogress event, the request could be bound to a special display
status handler.

xhr.onprogress = handleprogress;

FIGURE 8-4 File upload with real status indications
Free download pdf