var ajaxCall;
if (ajaxCall != null)
ajaxCall.abort();
ajaxCall = $.post('../etc..
I run this code in a function. However, ajaxCall is always undefined, even when its running (thos occurs when clicking the button who triggers the call before its complete). Any ideas how to solve this?
Thanks
You should do (you need to assign the variable before calling
abort()on it) (maybe your code is like this but from your example it seems to be in a different order)