Opened 13 years ago
Closed 13 years ago
#5814 closed bug (wontfix)
Ajax code works in 1.3.2, but fails in 1.4 (final)
Reported by: | daxx909 | Owned by: | |
---|---|---|---|
Priority: | critical | Milestone: | 1.4 |
Component: | ajax | Version: | 1.4 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
In order to maintain object context I use a serverObject function.
However, with jQuery 1.4 I get an exception: "this.callback is null or not an object".
It fails in IE8, Firefox, Opera, Safari and Chrome.
See the attached file as an example. Replace jquery-1.4.js by jquery-1.3.2.js, and everything works as it should.
Attachments (1)
Change History (2)
Changed 13 years ago by
comment:1 Changed 13 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
I think your good idea collided with jQuery 1.4's good idea. :)
http://api.jquery.com/jQuery.ajax/
You can now pass in a context
argument to $.ajax or set it in $.ajaxOptions, and that will become the this}} for the callback invocations. By default, it's the ajax options object itself. Your 1.3 object had a {{{context}} property so jQuery 1.4 used it as the {{{this
, but you were expecting it to be the original options object.
You can either change the name of your own context argument, or if you are just using this on 1.4 then take advantage of it doing the work for you.
Test case