Bug Tracker

Modify

Ticket #9782 (closed bug: duplicate)

Opened 23 months ago

Last modified 22 months ago

error 'jQuery16206078858876646126_1310116245411 is not a function' after abort POST JSONP ajax-query

Reported by: anonymous Owned by: anonymous
Priority: low Milestone: 1.next
Component: ajax Version: 1.6.2
Keywords: Cc:
Blocking: Blocked by:

Description

example:

var p = $.ajax({ url : ' http://suggest.yandex.ru/suggest-ya.cgi', data : { part : 'test', v : 3 }, dataType : 'jsonp'});

setTimeout(function() { p.abort(); }, 10);

Change History

comment:1 Changed 23 months ago by timmywil

  • Owner set to anonymous
  • Priority changed from undecided to low
  • Status changed from new to pending
  • Component changed from unfiled to ajax

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on  http://jsfiddle.net that reproduces the issue experienced to help us assess your ticket.

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

I do not think jsonp can be aborted consistently across browsers. Once the script tag is on the page, some browsers will load the script whether you take the tag off or not.

comment:2 Changed 23 months ago by Filatov Dmitry <dfilatov@…>

When abort jsonp request you need no remove callback at once. If you replace callback at this moment something like this, you have no error:

window.jQuery16207753935731721285_1310374972748 = function() {

delete window.jQuery16207753935731721285_1310374972748;

}

comment:3 Changed 22 months ago by dzearing

We are hitting this scenario as well in our scenarios.

If you abort a jsonp request, the response is still processed, causing a script error because the callback function was nuked.

Please fix this. Thanks.

comment:4 Changed 22 months ago by jaubourg

  • Status changed from pending to closed
  • Resolution set to duplicate

comment:5 Changed 22 months ago by jaubourg

Duplicate of #8744.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.