Ticket #6144 (closed bug: invalid)
ajax success broken
| Reported by: | tuomo | Owned by: | |
|---|---|---|---|
| Priority: | Milestone: | 1.4.2 | |
| Component: | ajax | Version: | 1.4 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Hello. I use jQuery ajax request in this way:
function sendData(url, callback) {
var values = getPageData(); var encoded = $.toJSON(values);
$.ajax({
type: "POST", url: url, data: encoded, success: callback, dataType: "json"});
}
With very large responses(>100kB) the success function is never called. If response is small, the success function works fine. I don't have any problems with jQuery 1.3.2, the problem is with versions 1.4.2 and 1.4.1
Change History
comment:2 Changed 3 years ago by tuomo
- Status changed from closed to reopened
- Resolution invalid deleted
comment:3 Changed 3 years ago by john
- Status changed from reopened to closed
- Resolution set to invalid
Uhh - why was this reopened? Please don't reopen the ticket unless you have something to add.
comment:4 Changed 3 years ago by tuomo
I'm pretty sure that my JSON is valid. I pasted my server result to JSON validator http://jsonlint.com/, and the test passed.
There is my server response, this is the valid JSON string. And I can't get it work with jQuery 1.4.2, with 1.3.2 it works fine!
I can send my problematic server response to you with mail...
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

It's likely because your JSON is malformed, more information here: http://yehudakatz.com/2010/01/15/jquery-1-4-and-malformed-json/