|
|
 |
Article:
 |
 |
Very Dynamic Web Interfaces
|
| Subject: |
Help please |
| Date: |
2005-04-07 17:23:52 |
| From: |
rkhlin |
|
Response to: Concerns
|
|
XMLHTTPRequest is really fantastic to use.
But I am having a problem at the moment.
When I wrote a JS function which calls 1st url to change one div, then it calls another url to change another div.
However only the 2nd url call is executed, the function simply ignore the 1st call (so only div2 got updated).
Is there a way I can make sure it get the 1st url done and then the 2nd url sequentially, Since no multi-threaded is supported in current JS.
I used window.setTimeout(1000); in between 2 calls, then it wont go at all.
Please help!
|
- Help please
2005-04-07 23:22:37 rkhlin
[Reply]
Solved myself, use setTimeOut(func2,msec);
- Help please
2005-04-21 11:27:32 nGear
[Reply]
The second one is probably not coming through, because you donot wait for the first request to finish. (i.e. the readystate did not get to 4 in the eventhandler)
So your current solution won't work if the server takes a long time to serve the xml for the first div.
|
 |
Sponsored By:
|