Hi Jed, please do not forget that you could have more than a JSONP callback, and that with your function you will "break" every request.
Probably, it is exactly what you were looking for :-) Kind Regards On Fri, Oct 3, 2008 at 11:29 AM, Jed Schmidt <[EMAIL PROTECTED]> wrote: > > The ticket lives here: > > http://dev.jquery.com/ticket/3442 > > Many thanks to Andrea. I ended up using a simpler but similar > function: > > function cancelJSONP() { > for ( var jsonp in window ) > if ( jsonp.substr( 0, 5 ) == "jsonp" ) > return window[ jsonp ] = function(){}; > }; > > It doesn't do any garbage collection on the window callback or script > tag, but perhaps these will be easier to implement once the ticket is > addressed. > > Thanks Andrea and John, > > Jed Schmidt > > On Oct 2, 8:42 am, "John Resig" <[EMAIL PROTECTED]> wrote: > > Hmm - that might be an interesting enhancement to jQuery core, > > actually - returning a dummy object when we do a script injection with > > a single method: abort(). This way you could cancel a running request > > in the same was as an XMLHttpRequest. > > > > Would you be interested in filing a bug on this? Just reference this > discussion.http://dev.jquery.com/ > > > > --John > > > > On Wed, Oct 1, 2008 at 10:17 PM, Jed Schmidt <[EMAIL PROTECTED]> wrote: > > > > > Hello all, > > > > > I'm wondering if anyone here knows of a reliable way of canceling a > > > $.getJSON request for cross-domain JSONP. > > > > > For example, is there any way to figure out the name of the function > > > that jQuery appends to the window (such as "jsonp1222912605851"), so > > > that I can just replace it with function(){}, and prevent the original > > > callback from executing? > > > > > Any help appreciated, > > > > > Jed Schmidt > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---