Mistake in 1.0.4 release notes
There is a mistake in the release notes concerning $.ajax' processData
option, caused by flawed docs.
I tried to fix them, it says now this:
(Boolean) processData - By default, data passed in to the data option as
an object
* other as string will be processed and transformed into a query
string, fitting to
* the default content-type "application/x-www-form-urlencoded". If
you want to send
* DOMDocuments, set this option to false.
It looks like John already fixed the blog post, but still, the usage of
processData isn't that clear. Better examples may be:
// The data to send to the server
// use default processing
var params = {
name: "John",
city: "Boston"
};
// Send the data, but have it be converted into
// a format the server can understand
$.ajax({
type: "POST",
url: "/user/add/",
data: params
});
// The data to send to the server
// use default processing
var params = /* create xml document or whatever you want to send as an object, not as a string */;
// Send the data, but have it be converted into
// a format the server can understand (w/ processData)
$.ajax({
type: "POST",
url: "/user/add/",
data: params,
processData: false
});
In other words:
If a String is used as the data-option, no processing is done. If an
object is used, it is converted to a String, as long as the processData
option is true (default).
Please help improving the documentation/examples to make it clear to
everyone.
--
Jörn Zaefferer
http://bassistance.de
_______________________________________________
Jquery-dev mailing list
Jquery-dev@bassistance.de
http://lists.bassistance.de/mailman/listinfo/jquery-dev