Informing a user while an AJAX request is in progress
As AJAX applications do not have full page reloads, if an AJAX request is pending to the server, and the user can't see any notification, they may get confused.
It is, therefore, necessary that a user must be provided some kind of information while an AJAX request is in process. This is an important point worth noting while creating AJAX applications that should not be ignored.
In this recipe, you will learn how users can be notified that an AJAX request is taking place and how to provide the feedback of the progress to the user.
Getting ready
Create a folder named Recipe2
inside the Chapter6
directory. The other thing that you need to do is visit either of these websites http://ajaxload.info/ or http://preloaders.net/. Here you will find animated images of loading icons. Choose an image and download it. You will need this image for this recipe. For this recipe I have used the following image from http://ajaxload.info/.
How to do it...
Create...