DaveEverFade Posted April 13, 2007 Share Posted April 13, 2007 I have a page using several ajax'ed objetcs (all using the same ajax function). One of the objects loops and does an Ajax refresh every 20 seconds. Unfortunately, somtimes the responses get mixed up and the response from one goes into the incorrect div. I tried to get around it by putting this at the start of my ajax function: XMLHttpRequest=null To make sure there are no current requests but we still get problems. Any ideas? Many thanks Dave Quote Link to comment Share on other sites More sharing options...
veridicus Posted April 15, 2007 Share Posted April 15, 2007 Since each request comes back to a JavaScript function call, can't you make a div loading function for refreshing content while all other requests use another callback? You could also have the response send back data telling your JS its intent is to update the DIV. Quote Link to comment Share on other sites More sharing options...
DaveEverFade Posted April 17, 2007 Author Share Posted April 17, 2007 I got around it another way buy changing window.status when readyState<4 then putting an if right at the start to see what window.status was. Many thanks anyway... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.