Jump to content

Multiple Ajax requests mix-up


DaveEverFade

Recommended Posts

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.