Bug Tracker

Opened 13 years ago

Closed 12 years ago

#6552 closed bug

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

});

},

Change History (4)

comment:1 Changed 13 years ago by velna_007

also not work of $.load function

in version 1.4.2 line 1809: params = null; should be : params = {};

comment:2 Changed 12 years ago by addyosmani

Priority: undecided

Can you please supply a reduced test case of this on jsFiddle?

comment:3 Changed 12 years ago by SlexAxton

Milestone: 1.4.31.5
Owner: set to velna_007
Status: newpending

comment:4 Changed 12 years ago by trac-o-bot

Status: pendingclosed

Automatically closed due to 14 days of inactivity.

Note: See TracTickets for help on using tickets.