| Issue 721: | Abort ajax call | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hi, Is it possible to abort refetching event when using Ajax? Grtz. Roy
Nov 21, 2010
Project Member
#1
adamrs...@gmail.com
Status:
Done
Nov 21, 2010
Already 'fixed' it by using Jquery's abort() method.
Aug 15, 2012
How, something like : $("#calendar").fullCalendar("stop"); OR $("#calendar").fullCalendar().stop(); ?
May 29, 2013
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 |