My favorites | Sign in
Project Home Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 721: Abort ajax call
1 person starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Nov 2010


Sign in to add a comment
 
Reported by mail2...@gmail.com, Nov 18, 2010
Hi,

Is it possible to abort refetching event when using Ajax?

Grtz. Roy
Nov 21, 2010
Project Member #1 adamrs...@gmail.com
currently not possible, but if more people request it, i will consider adding it. thanks
Status: Done
Nov 21, 2010
#2 mail2...@gmail.com
Already 'fixed' it by using Jquery's abort() method.
Aug 15, 2012
#3 jwfat...@gmail.com
How, something like : $("#calendar").fullCalendar("stop"); OR $("#calendar").fullCalendar().stop();  ?
May 29, 2013
#4 norm.mac...@gmail.com
I realize this is several years old and closed, but I wanted to share my experiences since this shows up on Google searches on the subject. 

I created an array in EventManager called ajaxObjects. Then, in _fetchEventSource, I push an object with a name (the URL of the source) and the ajax object itself onto the array. 

Elsewhere in EventManager I define two functions. abortSources() iterates over the ajaxObjects and abort()s any ajax requests that haven't completed yet and empties the array. abortSourceUrl(url) will find the ajaxObject with name = url and tries to abort() it if it hasn't completed. 

Then I export the functions over to Calendar so I can call it from within removeEventSource (and my added removeEventSources). I should probably empty items from the array as they complete, but my source list never gets super-long and is regularly cleared-out with abortSources so I'm not too worried. 

I will likely clean up this solution a bit and submit a pull request on github when I get a chance.
Sign in to add a comment

Powered by Google Project Hosting