X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=src%2Fajax%2Fajax.js;h=f9d46503ab42bc83d84a18bad5b82bb629d4f602;hb=9261e7ee13d867b3434ea0d9617ca30844318966;hp=eee3f06f2f4bddff2e10d968a5f8941f6d1ef0e8;hpb=d0eda6827f9bfcf88906e4e45f357cb40e425a05;p=jquery.git diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index eee3f06..f9d4650 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -597,7 +597,8 @@ jQuery.extend({ * * (String) url - The URL of the page to request. * - * (String) data - A string of data to be sent to the server (POST only). + * (String) data - Data to be sent to the server. If converted to a query + * string, if not already a string. Is appended to the url for GET-requests. * * (String) dataType - The type of data that you're expecting back from * the server (e.g. "xml", "html", "script", or "json"). @@ -708,14 +709,14 @@ jQuery.extend({ error: null, dataType: null, data: null, - url: null, + url: null }, s); // if data available if ( s.data ) { // convert data if not already a string if (typeof s.data != 'string') - s.data = jQuery.param(s.data) + s.data = jQuery.param(s.data); // append data to url for get requests if( s.type.toLowerCase() == "get" ) // "?" + data or "&" + data (in case there are already params)