List out differences between AJAX and JavaScript.JavaScript is a client-side script, used to control a web page at the client side once it has downloaded. The validations in case of JavaScript will be handled particularly on client’s browser and no server side requests will be handled. AJAX allows JavaScript to communicate with the remote script and receive the response from the server, without the need to reload the entire page. JavaScript is the base on which Ajax works.
Ajax is Asynchronous Java Script and XML. Here on sending request to the server, one needn’t wait for the response. Other operations on the page can be carried out. Hence, Asynchronous. On the other hand, Java script sends an HTTPRequest to the server and waits for the XML response.
E.g. populating State field. Using JavaScript we need to use the “Onchange” event where as using ajax, the request is just sent to populate the state list. Other operations can be carried out on the page.
Ajax is a part of Java Script programming. Java Script is used to manage and control a web page once downloaded. Ajax does not need to wait for the whole page to download.
Use of Ajax can reduce connections to the server since the script has to be requested once.
|