jQuery Ajax

AJAX = Asynchronous Javascript and XML
AJAX is a technique for creating fast and dynamic web pages and it is not a programming language
AJAX is the art of exchanging data with a server and update parts of a web page without reloading the whole page

AJAX States

Low level Ajax method ( $.ajax() )

Load Method

Get Method

The " $.get() " method loads data from the server using a HTTP GET request.

Syntax $(selector).get(URL,data,function(data,status),dataType)
Note :
Generally load is used when the amount of data sent is less and post is used to send large amount of data.
url : Required. Specifies the url to send the request to
data : Optional. Specifies data to send to the server along with the request
function(data,status,xhr) : Optional. Specifies a function to run if the request succeeds
data - contains the resulting data from the request
status - contains the status of the request ("success", "notmodified", "error", "timeout", or "parsererror")
dataType : Optional. Specifies the data type expected of the server response.
Note:- By default jQuery performs an automatic guess.
Possible types:
"xml" - An XML document
"html" - HTML as plain text
"text" - A plain text string
"script" - Runs the response as JavaScript, and returns it as plain text
"json" - Runs the response as JSON, and returns a JavaScript object .

Post Method