Side navigation
#6552 closed bug ()
Opened May 10, 2010 05:05AM UTC
Closed November 11, 2010 11:09PM UTC
ajaxSetup for data not work of get method
Reported by: | velna_007 | Owned by: | velna_007 |
---|---|---|---|
Priority: | undecided | Milestone: | 1.5 |
Component: | ajax | Version: | 1.4.2 |
Keywords: | ajaxSetup | Cc: | |
Blocked by: | Blocking: |
Description
call:
$.ajaxSetup({data:{__ajax=1}})
then every call on $.post will add __ajax=1 parameter, but call on $.get does't
in version 1.4.2 line 4888:
get: function( url, data, callback, type ) {
shift arguments if data argument was omited
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
data = null;
}
return jQuery.ajax({
type: "GET",
url: url,
data: data,
success: callback,
dataType: type
});
},
it should be :
get: function( url, data, callback, type ) {
shift arguments if data argument was omited
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
data = {};
}
return jQuery.ajax({
type: "GET",
url: url,
data: data,
success: callback,
dataType: type
});
},
Attachments (0)
Change History (4)
Changed May 10, 2010 07:25AM UTC by comment:1
Changed October 26, 2010 02:27PM UTC by comment:2
priority: | → undecided |
---|
Can you please supply a reduced test case of this on jsFiddle?
Changed October 27, 2010 05:32PM UTC by comment:3
milestone: | 1.4.3 → 1.5 |
---|---|
owner: | → velna_007 |
status: | new → pending |
Changed November 11, 2010 11:09PM UTC by comment:4
status: | pending → closed |
---|
Automatically closed due to 14 days of inactivity.
also not work of $.load function
in version 1.4.2 line 1809:
params = null;
should be :
params = {};