Skip to main content

Bug Tracker

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 velna_007 comment:1

also not work of $.load function

in version 1.4.2 line 1809:

params = null;

should be :

params = {};

Changed October 26, 2010 02:27PM UTC by addyosmani comment:2

priority: → undecided

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

Changed October 27, 2010 05:32PM UTC by SlexAxton comment:3

milestone: 1.4.31.5
owner: → velna_007
status: newpending

Changed November 11, 2010 11:09PM UTC by trac-o-bot comment:4

status: pendingclosed

Automatically closed due to 14 days of inactivity.