There's a little-known non-documented variable that we use for selenium tests that shows us if there are any ajax requests in process...
It's contained in /tacos-core/src/java/net/sf/tacos/ajax/components/tacos.js and it's tacos.requestsInFlight It stores an integer with how many ajax requests are currently being executed (i.e. have started but have not yet had a response) There's also a method tacos.isServingRequests that's simply defined as: tacos.isServingRequests = function() { return (tacos.requestsInFlight > 0); } Ákos Maróy wrote: > Hi, > > I'm trying to reach the following functionality: I have lots of links on > a page, say each of them AjaxDirectLinks - and I want to avoid them to > be concurrently executed. > > I theoretical solution would be to execute some JavaScript code whenever > an AjaxDirectLink is clicked. This would set a JavaScript property > signifying that there's a 'call in progress' - and of course each link > would check this property, and would not do anything if it finds it set. > > After the Ajax call is executed, and all is updated, the property would > be reset, so all AjaxDirectLinks would 'accept' clicks. > > So far for the theory - but how would one implement such a thing? Is > there a way to catch the click event on an AjaxDirectLink, and > conditionally not execute the 'real' AjaxDiretLink at all? Is there a > way to catch the event of when the Ajax call completed, so as to reset > this global flag? > > > Akos > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Tacos-devel mailing list > Tacos-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tacos-devel > > -- Andreas Andreou - [EMAIL PROTECTED] - http://andyhot.di.uoa.gr Tapestry / Tacos developer Open Source / J2EE Consulting ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Tacos-devel mailing list Tacos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tacos-devel