diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2006-11-17 10:15:31 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2006-11-17 10:15:31 +0000 |
commit | c119a80ea37a6940ec55dfb7b9f9b296800c7928 (patch) | |
tree | eca74d82e5e14f7599e287b0ed74d2d2fb852a86 /src | |
parent | 1e620109d7bd3f77f770f5dbe22f3ef616fa0bb0 (diff) | |
download | jquery-c119a80ea37a6940ec55dfb7b9f9b296800c7928.tar.gz jquery-c119a80ea37a6940ec55dfb7b9f9b296800c7928.zip |
Added async option (ticket #367)
Diffstat (limited to 'src')
-rw-r--r-- | src/ajax/ajax.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 198685c00..686aa5524 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -632,6 +632,9 @@ jQuery.extend({ * content-type "application/x-www-form-urlencoded". If you want to send DOMDocuments, * set this option to false. * + * (Boolean) async - By default, all requests are send asynchronous (set to true). + * If you need synchronous requests, set this option to false. + * * @example $.ajax({ * type: "GET", * url: "test.js", @@ -716,7 +719,8 @@ jQuery.extend({ url: null, data: null, contentType: "application/x-www-form-urlencoded", - processData: true + processData: true, + async: true }, s); // if data available @@ -740,7 +744,7 @@ jQuery.extend({ var xml = new XMLHttpRequest(); // Open the socket - xml.open(s.type, s.url, true); + xml.open(s.type, s.url, s.async); // Set the correct header, if data is being sent if ( s.data ) |