December 2013
Intermediate to advanced
384 pages
9h 54m
English
$.ajax({ url:"setEmail", type:"get", accepts:"json", contentType: 'application/x-www-form-urlencoded; charset=UTF-8', data: {"first":"Brad", "last":"Dayley"} }).fail(function(){ alert("request Failed"); });
All AJAX request wrapper methods that you have been working with in his chapter are handled underneath through the .ajax(url [, settings]) interface. This interface is a bit more difficult to use, but it gives you much more flexibility and control of the AJAX request.
The .ajax() method is called the same way that .get() and .post() are, but the settings argument allows you to set a wide variety of settings when making the request.
Table 13.3 lists the more common ...
Read now
Unlock full access