#10941 closed bug (invalid)
When the same request multiple jsonp, browser through a window[jsonpCallback] not defined.
Reported by: | cfddream | Owned by: | cfddream |
---|---|---|---|
Priority: | low | Milestone: | None |
Component: | ajax | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
First, I do not define the window[jsonpCallback] function, jQuery will define it. But when the same request multiple jsonp, the browser through a error window[jsonpCallback] not defined. I test it from v1.5.2 to v1.7.1.
!#javascript $.ajax({ type: 'get', dataType: 'jsonp', data: 'query=' + encodeURIComponent(v), jsonp: 'callback', jsonpCallback: 'docallback', cache: true, url: 'http://abcd.com/e.php', success: function (data) { //do something } });
So I had to this way fix it.
window[jsonpCallback] = function () {};
Change History (6)
comment:2 follow-up: 4 Changed 11 years ago by
Owner: | set to cfddream |
---|---|
Status: | new → pending |
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.
comment:3 Changed 11 years ago by
Status: | pending → new |
---|
This is my test case http://jsfiddle.net/cfddream/ZHPLB/
comment:4 Changed 11 years ago by
Replying to sindresorhus:
Thanks for taking the time to contribute to the jQuery project! Please provide a complete reduced test case on jsFiddle to help us assess your ticket.
Additionally, be sure to test against the jQuery Edge version to ensure the issue still exists. To get you started, use this boilerplate: http://jsfiddle.net/FrKyN/ Open the link and click to "Fork" (in the top menu) to get started.
This is my test case http://jsfiddle.net/cfddream/ZHPLB/
comment:5 follow-up: 6 Changed 11 years ago by
Component: | unfiled → ajax |
---|---|
Priority: | undecided → low |
Resolution: | → invalid |
Status: | new → closed |
You'd set your testcase to use jQuery 1.5.2. When I set it to jQuery 1.7.1, I didn't get any error.
comment:6 Changed 11 years ago by
Replying to sindresorhus:
You'd set your testcase to use jQuery 1.5.2. When I set it to jQuery 1.7.1, I didn't get any error.
Thanks. But, " i != data.i" . I think the correct result should be "i === data.i".