Duplicates!

mikesmullin - June 23, 2007 - 05:46
Project:Todolist
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I have discovered that the jQuery $.ajax() method will sometimes fail with an XMLHTTPRequest status of 0, which is apparently a problem that plagues AJAX applications in general. I have dealt with it in this module by automatically retrying when that happens, but sometimes it results in duplicate actions being taken (e.g. two copies of the same task being created).

I'm not sure how I am going to fix this yet, but I'm sure there's a way. Any suggestions are welcome.

#1

gagarine - July 25, 2008 - 16:48

On the page http://developer.mozilla.org/en/docs/XMLHttpRequest#Asynchronous_Usage they simply test the status of the request....

if (req.readyState == 4) {
if(req.status == 200)
dump(req.responseText);
else
dump("Error loading page\n");
}

#2

marvil07 - October 8, 2009 - 20:34
Version:5.x-1.x-dev» 6.x-1.x-dev

moving to 6.x to avoid forget it

 
 

Drupal is a registered trademark of Dries Buytaert.