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 |
Jump to:
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
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
moving to 6.x to avoid forget it