Appendix G (^) ❘ 541
bapp07.indd 02/17/2015 Page 541
scriptCharset For GET requests where the
dataType is set to script or
jsonp. Forces the request to be
interpreted with the specifi ed
charset. This is needed only if the
charset of local content is different
from the remote content being
loaded.
String
statusCode An object of numeric HTTP codes
and corresponding callback func-
tions that should be called when
that status code is encountered.
$.ajax({
statusCode : {
404 : function()
{
alert('URL not
found.');
}
}
});
Object
success A function that is executed upon
success of the AJAX request.
Function
timeout Sets the amount of time in mil-
liseconds (ms) to allow before a
timeout occurs.
Number
traditional Determines how parameters for
GET or POST requests will be
serialized. If set to true, a shallow
traditional serialization is used.
Boolean
type The type of HTTP request, one of
GET or POST. You can also specify
PUT or DELETE. However, those
methods are not supported by all
browsers.
String
url The URL to request. String
continues
http://www.it-ebooks.info
elliott
(Elliott)
#1