From 722e09b5eeb08f460ffccbccbe8059504d0e1c9d Mon Sep 17 00:00:00 2001
From: Han Seoul-Oh This example fetches the requested HTML snippet and inserts it on the page. Pages fetched with As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the The Promise interface also allows jQuery's Ajax methods, including This example fetches the requested HTML snippet and inserts it on the page. As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the The Promise interface also allows jQuery's Ajax methods, including
---
entries/jQuery.post.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/entries/jQuery.post.xml b/entries/jQuery.post.xml
index 91382759..6152350a 100644
--- a/entries/jQuery.post.xml
+++ b/entries/jQuery.post.xml
@@ -50,7 +50,7 @@ $.post( "ajax/test.html", function( data ) {
POST
are never cached, so the cache
and ifModified
options in jQuery.ajaxSetup()
have no effect on these requests.The jqXHR Object
- XMLHTTPRequest
object. This jQuery XHR object, or "jqXHR," returned by $.get()
implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done()
(for success), jqXHR.fail()
(for error), and jqXHR.always()
(for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax() documentation.XMLHTTPRequest
object. This jQuery XHR object, or "jqXHR," returned by $.get()
implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done()
(for success), jqXHR.fail()
(for error), and jqXHR.always()
(for completion, whether success or error; added in jQuery 1.6) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax()
documentation.$.get()
, to chain multiple .done()
, .fail()
, and .always()
callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.
// Assign handlers immediately after making the request,
@@ -66,7 +66,7 @@ var jqxhr = $.post( "example.php", function() {
})
.always(function() {
alert( "finished" );
-});
+ });
// Perform other work here ...
From 0acc93702bdc7009af5a1973e555b52de5cf7834 Mon Sep 17 00:00:00 2001
From: Han Seoul-Oh
The jqXHR Object
- XMLHTTPRequest
object. This jQuery XHR object, or "jqXHR," returned by $.get()
implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done()
(for success), jqXHR.fail()
(for error), and jqXHR.always()
(for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax()
documentation.XMLHTTPRequest
object. This jQuery XHR object, or "jqXHR," returned by $.get()
implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done()
(for success), jqXHR.fail()
(for error), and jqXHR.always()
(for completion, whether success or error; added in jQuery 1.6) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax()
documentation.$.get()
, to chain multiple .done()
, .fail()
, and .always()
callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.
// Assign handlers immediately after making the request,
From cafd1c828c7eca5c3230519f96bc61cc3695e26d Mon Sep 17 00:00:00 2001
From: Han Seoul-Oh
An alternative construct to the complete callback option, the .always()
method replaces the deprecated .complete()
method.
In response to a successful request, the function's arguments are the same as those of .done()
: data, textStatus, and the jqXHR object. For failed requests the arguments are the same as those of .fail()
: the jqXHR object, textStatus, and errorThrown. Refer to deferred.always()
for implementation details.
If the URL includes the string "callback=?" (or similar, as defined by the server-side API), the request is treated as JSONP instead. See the discussion of the jsonp
data type in $.ajax()
for more details.
As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest
object. This jQuery XHR object, or "jqXHR," returned by $.getJSON()
implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done()
(for success), jqXHR.fail()
(for error), and jqXHR.always()
(for completion, whether success or error) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax()
documentation.
As of jQuery 1.5, all of jQuery's Ajax methods return a superset of the XMLHTTPRequest
object. This jQuery XHR object, or "jqXHR," returned by $.getJSON()
implements the Promise interface, giving it all the properties, methods, and behavior of a Promise (see Deferred object for more information). The jqXHR.done()
(for success), jqXHR.fail()
(for error), and jqXHR.always()
(for completion, whether success or error; added in jQuery 1.6) methods take a function argument that is called when the request terminates. For information about the arguments this function receives, see the jqXHR Object section of the $.ajax()
documentation.
The Promise interface in jQuery 1.5 also allows jQuery's Ajax methods, including $.getJSON()
, to chain multiple .done()
, .always()
, and .fail()
callbacks on a single request, and even to assign these callbacks after the request may have completed. If the request is already complete, the callback is fired immediately.
// Assign handlers immediately after making the request,