Opened 10 years ago
Closed 10 years ago
#13996 closed bug (notabug)
jQuery.ajax: doesn't emit complete event for jsonp requests
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
When attempting an AJAX request with a dataType of 'jsonp', the complete event/callback never get ran. If this is intentional (which it shouldn't be -- how else am I supposed to handle jsonp AJAX errors?) it's not mentioned in the jQuery documentation.
Reproducable:
$.ajax({ dataType: 'jsonp', url: 'http://shopify.pyrokinetiq.com/credit/fetchCustomer/1', complete: function(xhr, status){ console.log(status); } });
Expected same result as:
$.ajax({ url: 'http://shopify.pyrokinetiq.com/credit/fetchCustomer/1', complete: function(xhr, status){ console.log(status); } });
Note: See
TracTickets for help on using
tickets.
Your URL http://shopify.pyrokinetiq.com/credit/fetchCustomer/1 is sending JSON and not JSONP. Ask about how you can put the P in your JSON (and why we cannot just P for you) on forum.jquery.com or StackOverflow.