Search within TutorialsPark

Jquery Ajax Methods Reference


Learn to use jQuery events that are triggered by Form Event


jQuery Events: Form Events

jQuery has a set of methods to use and handle Form related events.

Table : Ajax Issuing Requests

Methods Description
$.ajax([url], options) To make an Ajax request using the provided set of options. This is a low-level method that is often called via other convenience methods
.load([url], [data], [callback]) To make an Ajax request to url and places the response into the matched elements.
$.get(url, [data]) To make an Ajax request to url using the GET method.
$.getJSON(url, [data], [callback]) To make an Ajax request to URL, interpreting the response as a JSON data structure
$.getScript(url, [callback]) To make an Ajax request to URL, executing the response as JavaScript.
$.post(url, [data], [callback], [returnType]) To makes an Ajax request to URL using the POST method.

Table : Request Monitoring Methods

Method Description
.ajaxComplete(handler) To bind handler to be called when any Ajax transaction completes.
.ajaxError(handler) To bind handler to be called when any Ajax transaction completes with an error.
.ajaxSend(handler) To bind handler to be called when any Ajax transaction begins
.ajaxStart(handler) To bind handler to be called when any Ajax transaction begins, and no other are active.
.ajaxStop(handler) To bind handler to be called when any Ajax transaction ends, and no other are still active.
.ajaxSuccess(handler) To bind handler to be called when any Ajax transaction completes successfully.

Table : Configuration

Ajax Method Description
$.ajaxSetup(options) To set default options for all subsequent Ajax transactions.
$.ajaxPrefilter([dataTypes], handler) To modify the options on each Ajax request before it is processed by $.ajax().
$.ajaxTransport(transport Function) To define a new transport mechanism for Ajax transactions

Table : Utilities Methods

Methods Description
.serialize() To Encode the values of a set of form controls into a query string.
.serializeArray() To encode the values of a set of form controls into a JavaScript data structure.
$.param(obj) To encode a arbitary object of key-value pairs into a query string.
$.globalEval(code) To evaluate the given JavaScript string in the global context.
$.parseJSON(json) To convert the given JSON string into a JavaScript object
$.parseXML(xml) To convert the given XML string into an XML document.
$.parseHTML(html) To convert the given HTML string into a set of DOM elements

Table : Deferred Object

Methods Description
.resolve([args]) To set the state of the object to be resolved
.resolveWith(context, [args]) To set the state of the object to resolved while making the keyword this refer to context within callbacks.
.reject([args]) To set the state of the object to rejected.
.rejectWith(context, [args]) To sets the state of the object to rejected while making the keyword this refer to context within callbacks
.notify([args]) To execute any progress callbacks
.notifyWith(context, [args]) To execute any progress callbacks while making the keyword this refer to context.
.promise([target]) To return a promise object corresponding to this deferred object

Table : Method

Methods Description
.replaceWith(content) To replace the matched element with content
.replaceAll(selector) To replace the elements matched by selector with the matched element

Table : Removal Methods

Methods Description
.empty() To removes the child nodes of each matched element
.remove([selector]) To remove the matched nodes{optionally filtered by selector} form the DOM
.detach([selector]) To remove the matched nodes(optionally filtered by selector) from the DOM, preserving jQuery data attached to them.
.unwrap() To removes the element's parent

Table : Data Methods

Methods Description
.data(key) To get the data item named key associated with the first matched element
.data(key, value) To set the data item named key associated with each matched element to value
.removeData(key) To remove the data item named key associated with each matched element.

Table : Copying Methods

Methods Description
.clone([withHandlers], [deepWithHandlers]) To make a copy of all matched element optionally also copying event handlers