IT. Expert System.

JQUERY

jQuery.ajax()


Description

The jQuery.ajax() method performs an asynchronous HTTP (Ajax) request.


v1.0

This method has the form:

jQuery.ajax(settings)
Parameter Description
settings (optional) A set of key/value pairs that configure the Ajax request

Return Value

This method returns an XMLHttpRequest object if no error.


v1.5

This method has the alternate form:

jQuery.ajax(url, [settings])
Parameter Description
url Specifies a string containing the URL to which the request is sent
settings (optional) A set of key/value pairs that configure the Ajax request

Return Value

This method returns an XMLHttpRequest object if no error.


The following table lists the available Ajax settings:

Setting / Description
accepts

Data Type: Map

Default: depends on DataType

Specifies the content type sent in the request header that tells the server what kind of response it will accept in return. It is recommended to change the setting for accepts within the $.ajaxSetup() method.
async

Data Type: Boolean

Default: true

Specifies whether or not to perform the Ajax request asynchronously.
beforeSend(XMLHttpRequest)

Data Type: Function

A callback function that is executed before the Ajax request is sent.
cache

Data Type: Boolean

Default: true (false for 'script' and 'jsonp')

Specifies whether or not to cache the response by the browser.
complete(XMLHttpRequest, textStatus)

Data Type: Function, Array

A callback function that is executed when the Ajax request has completed.

Note: As of jQuery 1.5, this setting can accept an array of functions. Each function will be called in turn.
contents

Data Type: Map

Specifies a map of string/regular-expression pairs that determine how jQuery will parse the response, given its content type.

(added in version 1.5)
contentType

Data Type: String

Default:
'application/x-www-form-urlencoded'

A string containing a MIME content type for the Ajax request.
context

Data Type: Object

Default: window

Specifies an object that will be made the context of all Ajax callbacks.
converters

Data Type: Map

Default: {"* text": window.String, "text html": true, "text json": jQuery.parseJSON, "text xml": jQuery.parseXML}

Specifies a map of dataType-to-dataType converters. Each converter's value is a function that returns the transformed value of the response.

(added in version 1.5)
crossDomain

Default: false for same-domain requests, true for cross-domain requests

If true, this setting specifies forcing a crossDomain request (such as JSONP) on the same domain.

(added in version 1.5)
data

Type: Object, String

A map or string to be sent to the server along with the Ajax request.
dataFilter(data, type)

Data Type: Function

A callback function that is executed before the Ajax request calls the success handler.
dataType

Data Type: String

Default: Intelligent Guess (xml, json, script, or html)

Specifies the type of data expected from the server (xml, html, json, jsonp, script, or text).
error(XMLHttpRequest, textStatus, errorThrown)

Data Type: Function

A callback function that is executed when the Ajax request fails.
global

Data Type: Boolean

Default: true

Specifies whether or not to trigger global Ajax event handlers for this request.
headers

Data Type: Map

Default: {}

Specifies a map of additional header key/value pairs to send along with the request.
ifModified

Data Type: Boolean

Default: false

Specifies whether or not the server shuld check if the page is modified before responding to the Ajax request.
isLocal

Data Type: Boolean

Default: depends on current location protocol

Specifies the current environment to be recognized as "local," (e.g. the filesystem), even if jQuery does not recognize it as such by default.

(added in version 1.5)
jsonp

Data Type: String

Specifies the name of the JSONP parameter to be passed to the server.
mimeType

Data Type: String

Specifies a mime type to override the XHR mime type.

(added in version 1.5.1)
password

Type: String

Specifies a password to be used in response to an HTTP access authentication request.
processData

Data Type: Boolean

Default: true

Specifies whether or not to convert sent data from object form into query string form.
statusCode

Data Type: Map

Default: {}

Specifies a map of numeric HTTP codes and functions to be called when the response has the corresponding code.

(added in version 1.5)
success

Data Type: Function, Array

A callback function that is executed when the Ajax request succeeds.

Note: As of jQuery 1.5, this setting can accept an array of functions. Each function will be called in turn.
timeout

Data Type: Number

Specifies the number of milliseconds after which the Ajax request will time out and fail.
traditional

Data Type: Boolean

Specifies whether or not to use the traditional style of param serialization.
type

Data Type: String

Default: 'GET'

Specifies the HTTP method to use for the request (GET or POST).
url

Data Type: String

A string containing the URL to which the Ajax request is sent.
username

Data Type: String

Specifies a username to be used in response to an HTTP access authentication request.
xhr

Data Type: Function

A callback function that is used to create the XMLHttpRequest object.
xhrFields

Data Type: Map

Specifies a map of fieldName-fieldValue pairs to set on the native XHR object.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 117 / 158850781. Delta: 0.00270 с