Commit Graph

234 Commits

Author SHA1 Message Date
jaubourg
e221d39e98 Script transport now uses ajaxSetup to define script dataType. 2011-01-12 18:54:15 +01:00
jaubourg
0c51e9d55f Fixes #4897. Added ?? as a context-insensitive placeholder for the callback name of a JSONP request. Unit tests provided. 2011-01-12 18:36:00 +01:00
jaubourg
1d1d4fe112 Moved unload abort code so that the event is only bound if the xhr transport is used. Fixes #5280. 2011-01-09 22:20:58 +01:00
jaubourg
8c8bd3bf6a Fixes #5812. =? will be detected even when it has been escaped during data serialization. 2011-01-09 21:48:52 +01:00
jaubourg
62a1a1a8fa Fixes #5803. Reworked jsonp prefilter so that it sets the dataType as jsonp and recognizes requests with originalSettings having jsonp or jsonpCallback to be jsonp. Moved default jsonp option value into ajaxSettings. Attached the transport to "jsonp" which avoids unnecessary testing. Transport factory sets dataType back to json for proper data conversion. 2011-01-09 21:19:27 +01:00
jaubourg
d515068ee8 Fixes #7868. ResponseText is now properly propagated for error callbacks. 2011-01-09 04:53:29 +01:00
jaubourg
98c6c4b2b0 Added a simple cache for xhr objects in the xhr transport. 2011-01-09 04:03:00 +01:00
jaubourg
c43b078c69 Renamed src/transports to src/ajax (in case we need prefilters in the future and to avoid a separate prefilters directory). 2011-01-06 01:17:31 +01:00
John Resig
b4e23b5af0 Reorganzing the jQuery source (first phase). 2007-09-08 12:42:32 +00:00
John Resig
84eb2cffca Forgot to update the $.param() tests. 2007-09-05 17:22:13 +00:00
John Resig
ad5539bab3 Re-disabled the Ajax tests in Safari. 2007-09-05 17:09:18 +00:00
John Resig
f96bf10415 Integration of Mike Alsup's excellent form serialization code. The benefits are as follows:
- New method: .serializeArray()
This returns an array of name/value pairs representing the contents of a form, or individual input elements.
- Enhancement: .serialize()
The results are correct now (as opposed to the mess from before), and allows you to serializes forms directly (rather than just the input elements).
- Enhancement: .val()
This now returns the correct value when dealing wih selects. Additionally, when dealing with multiple selects, it returns an array of values.

Based upon Mike's code:
http://malsup.com/jquery/form/comp/form.js

and test suite:
http://malsup.com/jquery/form/comp/test.html
2007-09-05 17:06:05 +00:00
John Resig
53dc6afc31 Removed all deprecated functionality for jQuery 1.2. A full list of what was removed can be found here: http://jquery.com/blog/2007/08/24/jquery-114-faster-more-tests-ready-for-12/ 2007-09-04 02:55:38 +00:00
John Resig
139393fe09 Removed all inline documentation. The current version of all documentation is stored online, on the wiki: http://docs.jquery.com/ 2007-09-04 01:57:35 +00:00
John Resig
d5bb0e3179 Re-disabled the ajax tests in Safari 3. 2007-09-03 23:59:31 +00:00
John Resig
a5dbcaf675 Added support for:
- Cross Domain getScript
  $.getScript("http://foo.com/script.js");
- JSONP
  $.ajax({ url: "script.js", type: "jsonp" });
  $.getJSON("script.js?callback=?");
- Cross Domain JSONP/getJSON
  $.getJSON("http://foo.com/script.js?callback=?");
- No-cache Ajax Requests
  $.ajax({ url: "test.html", cache: false });
2007-09-03 23:45:14 +00:00
John Resig
0477a6e99e Added a test case for "purple include", fixed a bug. 2007-08-25 03:55:12 +00:00
John Resig
34f1042902 New feature: You can now inject portions of a document via .load(), as opposed to the full thing.
Examples:
- $("#test").load("test.html #something");
- $("#test").load("test.html p.user");

Caveats:
- No scripts are injected when a selector is used.
- The selector is rooted inside the head and body - it's equivalent to doing:
  $("body,head").find(selector)
2007-08-25 03:33:08 +00:00
John Resig
257eaf7ee3 Marked all the appropriate methods as being deprecated for the 1.1.4 release (in preparation for 1.2). 2007-08-24 01:28:07 +00:00
John Resig
4df20c0c1b Brought back a husk method to represent evalScripts. I didn't realize so many plugins relied on it (it's deprecated in this release). 2007-08-24 01:06:23 +00:00
John Resig
f948f02680 Tweaked the Ajax test suite for Safari. 2007-08-22 07:10:50 +00:00
John Resig
8c15e852a4 Two quick fixes in relation to #1028. ajaxSetup shouldn't be deep and the boolean arg should be used, not overwritten with 'true'. 2007-08-21 04:46:07 +00:00
John Resig
e112e6b04d Make deep .extend() an optional argument - it will go deep if you pass in an boolean as the first argument (fixed bug #1028). 2007-08-21 04:42:31 +00:00
John Resig
2ef4093cf7 Complete overhaul of the Ajax test suite, it's now passing in all browsers. In order to achieve this I had to fix a numbe
r of bugs in the suite itself, along with other random bugs that popped up. The following bugs were resolved along the wa
y: #1236 (.extend() keeps processing when it hits nulls), #1028 (.extend() now works recursively), #1080 ($.get no longer
 overwrites the data parameter), #1210 (Creating script and link tags now work), and #1463 (jQuery.global has been re-too
led to no longer leak memory and slow things down).
2007-08-19 23:37:26 +00:00
John Resig
f64eb21fad We were catching exceptions within the success callback of an Ajax request, then causing an error callback to be called (which is incorrect). (Bug #1441) 2007-08-19 00:48:53 +00:00
John Resig
6b0d3bb273 Brought back jQuery.globalEval(), fixing bug #1425. 2007-07-31 02:59:53 +00:00
Sean Catchpole
e6c067858e nevermind, I'm dumb. =P 2007-07-26 00:31:48 +00:00
Sean Catchpole
8a80d05a44 Fixed ajax array arguments in $.param 2007-07-26 00:27:56 +00:00
Brandon Aaron
b965c98ff1 missing semi-colon 2007-07-21 01:53:38 +00:00
John Resig
e20e8e6e3c Added support for parsererror errors from Ajax requests (bug #1145). 2007-07-21 00:52:30 +00:00
John Resig
f83211c684 Added a fix to prevent the completion callback from firing multiple times in Firefox on OSX (fixed bug #1406). 2007-07-20 22:21:41 +00:00
John Resig
c47f6f8f52 Completely reworked the evalScripts() code, fixing bugs #1332, #975, and #777. 2007-07-20 21:59:52 +00:00
John Resig
78db847ef2 The isTimeout fix from #970 was causing unintended status bugs (fixed). This also includes a fix for errors that occurred during an empty eval in IE (but #1410). 2007-07-20 19:33:44 +00:00
John Resig
a40f141f23 Made the error message equal to "timeout", if the request timed out. (Bug #970) 2007-07-20 18:58:22 +00:00
John Resig
d776dc9d5c Got some XHR tests to run, still some hanging threads (need to investigate). Started moving some Ajax tests away from using PHP (more portable this way). Fixed a number of XHR env bugs. 2007-07-09 03:08:20 +00:00
John Resig
03c623c35f Fixed an issue with JSON data in packed scripts. (Bug #1298) 2007-06-16 22:19:17 +00:00
Jörn Zaefferer
33ee5c317d Minor cleanup 2007-04-25 21:22:04 +00:00
Jörn Zaefferer
f63242f068 Fix for #1132 2007-04-18 18:35:34 +00:00
Jörn Zaefferer
bfe5f89106 Remove XMLHttpRequest shadowing, instead decide at runtime whether to create an ActiveXObject or the XMLHttpRequest, potentially fixing #963 2007-04-03 21:19:54 +00:00
Jörn Zaefferer
06b89271c1 Added test for #970 2007-03-25 10:55:22 +00:00
Jörn Zaefferer
e6ffe02503 Fixed docs for ajax timouet to mention that its in milliseconds 2007-03-25 10:52:40 +00:00
Jörn Zaefferer
98b721d27f Fix for #953, use always GET for $.get 2007-03-17 14:18:06 +00:00
Jörn Zaefferer
a4a6dfa6bd Backported wiki changes from http://docs.jquery.com/API/1.1.1/Ajax 2007-02-27 21:49:54 +00:00
Jörn Zaefferer
fade976946 Fix for #991 2007-02-22 20:37:37 +00:00
Brandon Aaron
ef1bd04532 Rolling back fix for #914 due to firefox double evaling scripts 2007-02-17 20:34:15 +00:00
Brandon Aaron
08ff26927b Fix for #914. 2007-02-07 15:20:30 +00:00
Jörn Zaefferer
1e07c1a311 Fix for #884 2007-01-31 21:14:33 +00:00
John Resig
c39d1a21c6 Fixed doing $.post() without any params. 2007-01-22 03:49:04 +00:00
John Resig
27c08b6544 Added a fix for an undefined param being passed to a load. 2007-01-20 04:04:02 +00:00
Jörn Zaefferer
32f688d303 Simplified check for XMLHttpRequest (saving a few bytes) and fixed load()-test 2007-01-17 14:17:09 +00:00
Mike Alsup
5ebd5f604a Fix bug #814. 2007-01-16 11:38:33 +00:00
Jörn Zaefferer
8ac2169dc0 Fixed two FF JS warnings 2007-01-14 22:51:55 +00:00
John Resig
34355cd698 Converted a lot of for loops to use jQuery.each() instead. 2007-01-14 21:49:59 +00:00
John Resig
2591319660 Added back in the .load() fix. 2007-01-14 20:07:36 +00:00
John Resig
382a7ecd6d Merged in some wiki fixes into the main docs. 2007-01-14 19:49:58 +00:00
John Resig
ed5bda3020 Added in jQuery.isFunction(). 2007-01-14 06:22:20 +00:00
John Resig
2bd21fe3b3 Touched up the code a little bit, saving some bytes. 2007-01-14 06:02:56 +00:00
John Resig
c690472135 Added a fix for <script>s getting executed twice when .load()ed. 2007-01-10 21:31:18 +00:00
John Resig
12e6335339 Fixed a bug with $("body") in dynamic documents, refactored $(...), stopped the test suite from trying to run Ajax tests locally. 2007-01-08 00:12:41 +00:00
Mike Alsup
386c0bc8a6 Updated param method to encode name as well as value (per spec: http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1) 2007-01-07 20:56:17 +00:00
John Resig
d7b73ea5c7 Improved the categories of a bunch of docs, upped the version to 1.1. 2007-01-07 09:20:19 +00:00
John Resig
ab0287681f Cleaned up some spacing and braces. 2007-01-06 06:18:02 +00:00
John Resig
c330527318 Converted instances of new function(){ ... } to use jQuery.each(...) instead. Also, removed unnecessary documentation for trigger functions (.mouseup()!?). 2007-01-06 05:31:47 +00:00
Jörn Zaefferer
2daf49296a Changed "Hash" to "Map" in docs 2007-01-04 10:03:34 +00:00
Mike Alsup
9c073265de added evalScripts test 2007-01-02 12:39:13 +00:00
Jörn Zaefferer
ee636689f4 Added note for IE's behaviour of stripping script tags when there are no chracters in front of it (see #746) 2007-01-01 15:26:24 +00:00
Jörn Zaefferer
8cbb4a0ae6 Modified tests to show #746 2006-12-31 15:44:59 +00:00
Jörn Zaefferer
4c66f62a6f Improved Mikes hack to ease testing against IE cache 2006-12-31 15:09:07 +00:00
Mike Alsup
1267e79699 add time to test.html request url using new Date().getTime() 2006-12-31 02:00:33 +00:00
Jörn Zaefferer
666cc90064 Fix for #534 2006-12-29 13:49:28 +00:00
Jörn Zaefferer
bfdf836da9 Documentation for $.ajaxSetup 2006-12-22 14:40:46 +00:00
Jörn Zaefferer
fc84b9db10 Implemented global ajax settings - no documentation yet 2006-12-22 13:56:36 +00:00
Jörn Zaefferer
ccc4c7663a Fixed typo 2006-12-21 18:37:24 +00:00
Jörn Zaefferer
98b1b580c7 A few corrections to the testsuite to imrove the failure testing 2006-12-21 15:23:59 +00:00
Jörn Zaefferer
a0d5e89a1e Added note to load() to avoid using it to load scripts (#456) 2006-12-21 13:39:14 +00:00
Jörn Zaefferer
6b8ffe79f4 Implemented a better error handling for ajax requests. Exceptions caused by dropping connections are now handled, too. 2006-12-21 13:35:32 +00:00
Jörn Zaefferer
0f5292b991 Added test for sync requests with callbacks (#534) 2006-12-21 12:57:22 +00:00
Jörn Zaefferer
2abdbd4e30 Fixed wheather-whether typo - Thanks Erik 2006-12-20 11:25:15 +00:00
Jörn Zaefferer
898ca3198b Fixed synchrnous requests, improved AJAX inline documentation 2006-12-15 09:13:24 +00:00
Jörn Zaefferer
3e165ae5ab Fixed docs for $.ajax' processData option 2006-12-13 19:04:36 +00:00
Jörn Zaefferer
010a112e04 Fixed #471 2006-12-11 08:53:33 +00:00
Jörn Zaefferer
f1c91fd023 Renamed $.ajax's "before"-option to "beforeSend" to prevent conflict with form plugin - may be a good convention to use beforeXXX and afterXXX everytime for callbacks... 2006-12-05 22:58:27 +00:00
Jörn Zaefferer
2bdd208e41 Renamed preprocess to before, for consistency with form plugin 2006-12-04 19:40:25 +00:00
Jörn Zaefferer
a6ce303187 Simplified XMLHttpRequest shadow (tested on 5.5, 6 and 7); Introduced preprocess callback (#384) - IE seems to fail to send the correct headers 2006-12-04 19:37:49 +00:00
Jörn Zaefferer
39c05d3649 Fixed jQuery.eval (or rather, jQuery.globalEval to avoid problems with FF) 2006-12-02 13:43:02 +00:00
Jörn Zaefferer
dc6f9cfc9c Fixed serializing arrays (bug #448) 2006-11-30 20:52:24 +00:00
Jörn Zaefferer
fea94528e2 Fixed docs for $.ajax for data option 2006-11-28 11:36:54 +00:00
Jörn Zaefferer
ae58d24fd5 Another attempt to fix the getScript problem 2006-11-21 09:55:34 +00:00
Jörn Zaefferer
953bf593a6 Fixed typo in comment 2006-11-21 09:21:38 +00:00
Jörn Zaefferer
15a30ba90c Better fix for #407 issue 2006-11-21 09:14:29 +00:00
Jörn Zaefferer
46faa03820 Fix for bug #407, yet to be tested 2006-11-20 20:37:28 +00:00
Jörn Zaefferer
7cc550727c Testsuite 2.0 2006-11-18 13:37:01 +00:00
Jörn Zaefferer
797ccbaf31 Heavily improved documentation for $.ajax, but may still need some fixes 2006-11-18 10:37:33 +00:00
Jörn Zaefferer
cb0fbbbac1 Return XMLHttpRequest from $.ajax() to allow aborting etc. 2006-11-17 14:49:44 +00:00
Jörn Zaefferer
c119a80ea3 Added async option (ticket #367) 2006-11-17 10:15:31 +00:00
Jörn Zaefferer
1e620109d7 Fixed an issue with getJSON (type was not correctly passed on when data was ommited); Added more options to $.ajax to provide more flexibility (bug #371) 2006-11-17 09:56:30 +00:00
Brandon Aaron
6404d6e3ec Missing '}' in jQuery.param method in ajax.js 2006-11-16 20:39:28 +00:00
Stefan Petre
317ea5caea if one value of key/value pairs is array then treat each array value in part 2006-11-16 10:30:14 +00:00
Jörn Zaefferer
9261e7ee13 Fixed a missing semicolon 2006-11-13 10:37:42 +00:00
Jörn Zaefferer
93c1340d55 Fixed doc for $.ajax data option 2006-11-11 12:11:37 +00:00
Jörn Zaefferer
d0eda6827f Fixed docs for load; Added the response as third paramter for load callback (partly fixing bug #337) 2006-11-11 12:08:48 +00:00
Jörn Zaefferer
7ff54c4034 Refactored all logic from $.get and $.post into $.ajax, now they are only convenience delegators 2006-11-11 11:34:51 +00:00
Jörn Zaefferer
03b0a9c654 Modified test for load(); added fix for trigger, where it modifies data passed to it, which causes ugly side-effects 2006-11-09 21:16:03 +00:00
Jörn Zaefferer
98e8ea3186 Added pseudo-fix for #164; fixed some tests that failed in IE 2006-11-07 11:19:44 +00:00
Klaus Hartl
7d58c0f936 Changed return type to undefined for certain functions, as discussed. 2006-11-04 21:09:05 +00:00
Jörn Zaefferer
7b780def0d Refactored ajax module: Dropped internal arguments from ajax(); Modified testsuite to improve display 2006-11-03 11:30:57 +00:00
Brandon Aaron
40b55adf5c Another $ bites the dust. Should be all of them now. 2006-11-01 21:59:56 +00:00
John Resig
af961d58c2 Fixed all warnings generated when javascript.options.strict is enabled in Firefox about:config. 2006-10-15 02:57:55 +00:00
Jörn Zaefferer
e7669f64d8 Added test for #174; Modified failing (IE) tests for find 2006-10-13 14:56:14 +00:00
Jörn Zaefferer
bfa8306633 Fix for #265: Initialize defaults for global and timeout properly when $.ajax is called internally (argument list instead of hash) 2006-10-13 14:02:29 +00:00
Jörn Zaefferer
cb53fc02b6 Fixed #216, added several tests for ajax module and fixed more stuff revealed by those; Reverted Johns change for each (changeset 433), caused way too much trouble 2006-10-13 13:57:55 +00:00
Jörn Zaefferer
2e544e9eb8 Added 2 of 3 fixes of #164 2006-10-11 13:35:05 +00:00
Jörn Zaefferer
6cb2e8ee8b Fixed second test for load() 2006-10-09 07:24:46 +00:00
Jörn Zaefferer
fac6a87dcf Fixed test for load(url) 2006-10-08 14:34:13 +00:00
Jörn Zaefferer
7b2c84ddbe Removed (hopefully) all references to $ within the jQuery code itself 2006-10-06 17:15:33 +00:00
Jörn Zaefferer
29f3fd50f7 Added test for bug #232 2006-10-06 14:14:00 +00:00
Jörn Zaefferer
eee853f120 removed the test for bug #164, the test suite is unable to handle the resulting error in IE correctly. I'll add it back later. 2006-10-03 10:55:09 +00:00
Jörn Zaefferer
ad2a6bd916 Reset ajaxTimeout after running timeout tests 2006-10-02 16:58:33 +00:00
Jörn Zaefferer
785de349f5 Small fixes to tests 2006-10-02 16:45:35 +00:00
Jörn Zaefferer
7654d3b833 Fixed bug #215 2006-10-01 15:00:16 +00:00
Jörn Zaefferer
08d865862a Fixed bug #165 (ignoring the exception) and #156 (ifModified option added to $.ajax) 2006-10-01 14:32:29 +00:00
Jörn Zaefferer
e94db76ada Added local timeout option for $.ajax + test 2006-10-01 14:15:56 +00:00
Jörn Zaefferer
7dd456176d Added tests for global and local ajax handlers, added global option to $.ajax to allow suppressing of global events 2006-10-01 14:05:10 +00:00
Jörn Zaefferer
10532fb3ae Added tests, fixed getScript and getJSON, fixed comment in $.ajax 2006-09-30 14:32:49 +00:00
Jörn Zaefferer
327bfb88a2 Modified test for bug #164 2006-09-23 08:34:50 +00:00
Jörn Zaefferer
b0c3711d3e Refactored test suite to allow async tests (use stop() before starting an async request, use start() when finished), added test for bug #164 2006-09-19 09:49:22 +00:00
John Resig
eb29e285f3 Added a couple new AJAX methods and finished documenting everything. 2006-09-08 10:18:46 +00:00
John Resig
484af2a45a About half done documenting the AJAX module. 2006-09-01 06:50:35 +00:00
John Resig
d2529835be Added native support for JSON data. 2006-08-31 06:32:27 +00:00
John Resig
fb534aea03 Added support for the native AJAX object in IE 7. 2006-08-31 06:30:44 +00:00
John Resig
874e4f65ee Added a bunch of fixes for AJAX timeouts, etc. in Safari. 2006-08-22 07:32:25 +00:00
John Resig
26580d2675 Made some minor fixes to how content-type and context is handled on remote XML files. 2006-08-17 05:11:34 +00:00
John Resig
5ec5de6953 Added in a mess of AJAX fixes and optimisations, made possible by Taku Sano. On top of his patch I touched up some of the code, made some bug fixes, and added some additional functionality (including the ability to load and eval a remote script file. 2006-08-17 04:18:32 +00:00
John Resig
a42a8e5afa Moved all the jQuery source to the new src directory. 2006-08-13 14:49:54 +00:00