Commit graph

145 commits

Author SHA1 Message Date
malsup d1931a8241 Fix for http://dev.jquery.com/ticket/6451 2010-06-15 11:02:26 +08:00
jeresig 8effe3a7de Made it so that you no longer need to build jQuery in order to run the test suite (but you'll still need a checkout of QUnit and Sizzle, at least). 2010-03-23 12:12:16 -04:00
jeresig 86ace44fbb Moving more properties onto jQuery.ajax, also copy them back to the jQuery object for backwards compatibility. 2010-03-02 10:44:48 -05:00
jeresig dcf0fa5048 More changes to get jQuery in line with JSLint. 2010-03-01 21:24:49 -05:00
jeresig 8c8f685a91 We don't want to increment the Ajax counter if there isn't a global event. 2010-03-01 19:31:13 -05:00
jeresig a4043cdcbf Land some additional tweaks related to running through JSLint. 2010-03-01 18:19:29 -05:00
jeresig a18f682012 Made some code tweaks related to running jQuery through JSLint (thanks to Lorin Larson for the JSLint run). 2010-03-01 12:44:56 -05:00
jeresig a45372a4c5 Adding in .bind(name, false), .unbind(name, false) support - an easy way to just stop bubbling and the default action on an element. Fixes #6188. 2010-02-27 09:02:13 -05:00
John Resig 639f4931b0 No reason to expose the temporary _load method. 2010-02-11 01:23:13 -05:00
Ben Alman 3c5b1ca03b Ok, this should actually fix #6041 :) 2010-02-06 11:46:44 +08:00
jeresig 54bd004e53 Make sure that we don't try to double-encode params using the traditional style. Fixes #6041. 2010-02-05 19:43:31 -05:00
Mike Alup ca90ffb332 Provided detailed message for JSON parse errors. Fixes #4435. 2010-01-25 18:48:52 -05:00
John Resig 1a14a38ff7 Make sure original context is maintained and not the deep extended one. Fixes #5924. 2010-01-25 01:08:24 -05:00
John Resig f91b944cab Objects with length properties weren't getting serialized properly by jQuery.param(). Fixes #5862. 2010-01-25 00:46:03 -05:00
John Resig 76236a1506 Use alternative technique for triggering an abort, preventing an exception from being thrown in Firefox. Fixes #5923. 2010-01-24 22:13:52 -05:00
John Resig c639405c4d Don't set the context in .load() as it stops the global ajax events from firing. Fixes #5922. 2010-01-24 21:58:32 -05:00
jeresig 0912109ffc Expose the JSON parsing logic. Fixes #5914. 2010-01-23 16:51:51 -05:00
jeresig a6ef036bb6 Centralize the logic for throwing exceptions. Fixes #5913. 2010-01-23 16:48:47 -05:00
John Resig 155ecf42a0 Make sure regular settings object is set as context for all Ajax requests, if none is specified. Fixes #5838. 2010-01-16 10:11:01 -05:00
jeresig 05aaa33957 Make sure that null params aren't traversed. Fixes #5794. 2010-01-13 09:29:01 -05:00
jeresig 23492fdf9f Send data if a DELETE Ajax request is done. Fixes #5752. 2010-01-13 00:42:22 -05:00
jeresig b5f077ae6a Make sure that the xhr object still exists after the abort is called. 2010-01-12 21:44:37 -05:00
jeresig 61983cbf17 Make sure oldAbort is only called if the xhr object still exists. 2010-01-12 16:50:59 -05:00
jeresig dd45c324ec Simplified some of the logic for handling the ajax aborts, making sure that ajaxStop isn't called twice. 2010-01-12 10:59:50 -05:00
jeresig d60b197810 ajaxStop was getting called too many times, separated some of the logic into the abort method itself. 2010-01-12 10:47:00 -05:00
jeresig 7afe6dcc08 Make sure that Opera fires events after an aborted Ajax attempt. Fixes #5787. 2010-01-12 10:31:51 -05:00
jeresig 44e6beb103 Make sure we do the malformed JSON check for all both JSON.parse and new Function (this helps to create uniformity between browser implementations of JSON.parse - like where Chrome allows some malformed strings. Thanks to DBJDBJ for the heads-up. 2010-01-11 16:43:21 -05:00
jeresig a9665bbe9b Make sure the exception has some level of parity with the error from json2.js. 2010-01-07 12:25:50 -05:00
jeresig 308d6cdad0 Make sure that a parsererror is thrown whenever malformed JSON comes back from a server (so that the Ajax error handler is called). Makes it uniform across browsers that do and don't have JSON.parse support. 2010-01-07 12:21:58 -05:00
jeresig c14fa516ae Back out the try/catch logic from around JSON.parse. We should always try to use it, otherwise security will suffer. 2010-01-07 11:54:26 -05:00
jeresig c68fbc2071 There's enough logic going on in jQuery.ajaxSettings.xhr to warrant splitting the function based upon the functionality. 2010-01-07 10:00:55 -05:00
jeresig 6861b5d4eb Added in support for content-type sniffing for scripts. Fixes #5718. 2010-01-06 10:19:38 -05:00
Rick Waldron 787f271052 Detect JSON Ajax requests by the response content-type (like is done with XML). Fixes #5709. 2010-01-05 19:48:16 -05:00
jeresig ff3645ee05 Try to use the native JSON parser in all cases and fallback to the old technique otherwise. This allows us to also handle cases where the JSON parser is unable to parse JSON-like strings correctly (e.g. {foo:bar}) which is something that worked before but would stop working with the switch to the new parser. 2010-01-05 17:33:41 -05:00
jeresig 3f648c4e3a Make sure that the ActiveX exception is caught if it's unable to be loaded. Fixes #2849. 2010-01-05 11:35:11 -05:00
jeresig b2289f3ec1 Try to use XMLHttpRequest in more cases in IE 7. Thanks to Matt Kruse and Sam Collett for the suggestions. Fixes #3623, #2849, #5338, and #5529. 2010-01-05 10:57:30 -05:00
jeresig 6cb2945837 Rather than declaring empty anonymous functions all around, introduce and use a single empty function. Thanks to Matt Kruse for the suggestion. 2009-12-31 09:50:49 -05:00
jeresig fe6c86d530 Experiment switching to using onreadystatechange rather than a setInterval for Ajax requests. Fixes #5735. 2009-12-30 23:53:06 -05:00
Ben Alman 3951894504 Moved jQuery.param "traditional" flag into jQuery.ajaxSettings, can now be overridden via 2nd argument to jQuery.param 2009-12-23 01:49:53 +08:00
jeresig 3776cbe314 Standardize on using double-quotes for string literals. 2009-12-21 20:13:16 -05:00
jeresig 61e37d4149 Made a number of spacing changes to bring the code more-inline with the jQuery Core Style Guideline. 2009-12-21 19:58:13 -05:00
Dave Methvin fe7e2fee16 Ignore case of script tags to make sure they're removed. Fixes #5668. Thanks to Motty/Fudgey for the report and Jitter for the patch! 2009-12-18 04:06:54 +08:00
Dave Methvin b31b9bd756 Add new html5 input types to list of serializable types. Older browers handle these as type="text" so they should be consistently serialized on both old and new browsers. Fixes #5667. 2009-12-18 04:05:45 +08:00
Dave Methvin d85d366fbf Default callbackContext to the $.extended ajax options for 1.3.2 compatibility, per #5654. 2009-12-18 04:01:39 +08:00
Ben Alman 04b92e7831 Reorganized param code slightly to once again define buildParams as a named function expression, as moving it outside the param closure would necessitate moving and rewriting the add function as well. 2009-12-18 04:01:05 +08:00
Ben Alman 927e1966de Further modified jQuery 1.4 .param() method to serialize arrays containing non-scalar values. PHP and jQuery BBQ can both deserialize these structures, while rack (as of 1.0.0) cannot. 2009-12-18 04:01:05 +08:00
John Resig 9e60fec46b Make sure that an actual timeout is triggered (and not accidentally triggered from a setInterval). Fixes #5609. 2009-12-09 08:09:41 -08:00
John Resig fbc73d45b4 Added in support for $.ajax jsonpCallback (allowing you to specify the name of the callback method - and allowing you to avoid skipping the cache). Fixes #4206. 2009-12-06 17:17:14 -08:00
jeresig 9c1db29a06 Adding in an extra check, per the comments in 25b0ba9f96. 2009-12-05 18:06:27 -05:00
John Resig 25b0ba9f96 Allow the user to explicitly set a content-type header even when there's no data being sent to the server. Fixes #1900. 2009-12-04 21:20:58 -05:00