How AJAX Works
An example implementation
Let’s say that you have a login form for your web application. To ensure that the provided login name and password is a match without using AJAX, your web application would have to load a whole new webpage that shows an account screen if the login was successful, or show an error screen if the login failed. This is the “old way” of logging users into their accounts.