Creating jQuery Ajax Call to PHP with JSON Response

Jquery provide $.ajax() function to get response from script through asyncronoun/synchronous.It provide dynamic data load from script, in other words you can said that with help of ajax you can dynamic load partial page or potion of page.It will also help to submit form data and save into database.
Jquery ajax function have a lot of properties but I am describing only few common properties.


– The target of the request url.


– The type of HTTP request either: "GET" (Default) or "POST".


– When we set asynchronous to TRUE then it will load data in background and this will allow you to run mutiple AJAX requests at the same time. If you set to FALSE the request will run and wait response from server,this is working only single threading process.


– data as a key value pair and send to target request script for process. example "{param1: 'value1'}".
dataType – Specify the type of data that is returned: "xml/html /json ".


– The function that is fired when the AJAX call has completed successfully.


– The function that is fired when the AJAX call encountered errors.

Simple Example and Source Code for AJAX Request Using jQuery