Is this efficient?
for example:
function testFunction(){
toggleSlide('addUsers');
document.getElementById(id).style.display = 'none';
getData('whatever.asp','container') // ajax call; page loads in div with id of container
/*the question I have is at this point - after an ajax call, specifically for loading a page. I usually find myself wanting to run another function or page call at this point. The problem is, since the previous page call is still in progress - it messes up the function and typically ignores one of the calls.
The way I've been working around that is setting a timeout for the second ajax page call or even function so that it waits a second or two for the prior call to finish */
setTimeout("getData('whateverTwo.asp','content')",1000);
}
That seems to work fine but just seems wrong.
Can anyone inform me of how to properly accomplish that - if it is indeed not the appropriate and,most importantly, efficient way of doing so?
Thank you for any help,
Israel

