jQuery AJAX Methods

You have seen basic concept of AJAX using jQuery. Following table lists down all important jQuery AJAX methods which you can based your programming need:

Methods and Description

jQuery.ajax{options}

load a remote page using an HTTP request.

 

jQuery.ajaxSetup{options}

Set up global settings for AJAX requests.

 

jQuery.ger{url,[data],[callback],[type]}

Load a remote page using an HTTP GET request.

 

jQuert.getJson{url,[data],[callback]}

Load JSON data using an HTTP GET request.

 

jQuery.getScript{url,{callback}]

Loads and executes aJava Script file using anHTTP GET request.

jQuery.post{url,[data].[callback],[type]}

Load  a  remote page using anHTTP POST request.

 

Load{url,[data][callback]}

Load a HTML from a remote file and inject it inot the DOM.

 

Serialize{}

Serializes a set of input elements into a string of data.

 

SerializeArray{}

Serializes all forms and form elements like the .serialize{} method but returns a JSON data structure for you to work with.

 

jQuery AJAX Events

You can call various jQuery methods during the life cycle of AJAX call progress. Based on different events/stages following methods are available:

You can go through all the AJAX Events

 

Methods and Description

ajaxComplete{callback}

Attach a function to be executed whenever an AJAX request completes.

 

ajaxStart{call back}

Attach a function to be executed whenever an AJAX request begins and there is none alreadyactive.

 

Ajax Error{callback}

Attach afunction to be executed whenever an AJAX request fails.

 

ajaxSend{callback}

Attach a function to be executed before an AJAX request is sent.

 

ajaxStop{callback}

Attach a function to be executed whenver all AJAX requests have ended.

 

ajaxSucess{call-back}

Attach a function to be executed whenever an AJAX request completes successfully.