AJAX = Asynchronous JavaScript and XML. AJAX is about loading data in the background and display it on the webpage, without reloading the whole page. The ajax() method is used to perform an AJAX (asynchronous HTTP) request. Notes: Asynchronous means that the script will send a request to the server, and continue it's execution without waiting for the reply. As soon as reply is received a browser event is fired, which in turn allows the script to execute associated actions. The serialize() method creates a URL encoded text string by serializing form values readyState Holds the status of the XMLHttpRequest. Changes from 0 to 4: 0: request not initialized 1: server connection established 2: request received 3: processing request 4: request finished and response is ready The parameters specifies: beforeSend(xhr): A function to run before the request is sent eg: beforeSend: function() { xhr.setRequestHeader("Accept", "text/javascr...
Coding Cheatsheets - Learn web development code and tutorials for Software developers which will helps you in project. Get help on JavaScript, PHP, XML, and more.