Thanks for the (only :-?) answer, but my question was not how to detect if a function is running, but how to cancel its execution. Although, granted, it would be a difficult concept to grasp, there are moments when you want to cancel at least the receiving of data to the callback. Essentially, I am looking at a function similar to clearTimeout(t) after a t=setTimeout(function,interval).
____________ Costin Manda ECRM Europe ----- Original Message ----- From: "zacksz" <[EMAIL PROTECTED]> To: "Ajax.NET Professional" <[email protected]> Sent: Wednesday, August 16, 2006 5:59 PM Subject: [ajaxpro] Re: How to cancel an Ajax request? > > I would make a variable outside the function to see if it is running > like this > > var bIsRunning = false; > > function funcName() { > if (bIsRunning == true) { > return; > } > bIsRunning = true; > AjaxProNameSpace.Function(){ > bIsRunning = false; > } > > } > > if will not allow the function to run again until it is done. since > AJAX makes a que make sure to set "bIsRunning = false" inside the AJAX > Function, you should also see if there was an error and handle it as > well. > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ajax.NET Professional" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/ajaxpro The latest downloads of Ajax.NET Professional can be found at http://www.ajaxpro.info/ Don't forget to read my blog at http://weblogs.asp.net/mschwarz/ -~----------~----~----~----~------~----~------~--~---
