|
Yes. I believe in this case, they are being called in succession too quickly than what the script design allows for. I think what is happening is that imagelist() is working properly, but the results of imagelist() is dependent on whether the write() request reaches the PHP server quicker than the imagelist() request. You are using XMLHttpRequest asynchronously which means that even though you are send two requests off nearly simultaneously, there is no guarantee that the first one will finish before the second one.
If that is correct, then there are a few ways you could solve this, one of which is to use a callback on the write() function that calls imagelist() when write()'s AJAX is done.
__________________
The interlocking pieces of web development: usability, performance, accessibility, and standards.
|