Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#3957 closed bug (invalid)

endless loop in jquery.post

Reported by: atlithorn Owned by:
Priority: major Milestone: 1.3.2
Component: ajax Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:


If you call jquery.post in a success callback for an earlier jquery.post you end up in an endless loop. The data provided in each success callback is the same as in the first request.

My example was posting data that was possibly invalid and the succcess callback asked for user validation that they really meant to post the data. If the user confirmed then a new jquery.post was fired. The success callback for that jquery.post was immediately called with the same data as in the original request which then asked for user confirmation again. The second jquery request (with user acceptance flag) is sent off but that callback is never fired until the user asks to cancel :)

My workaround was to break the execution thread by calling the second jquery.post via window.setTimeout

Change History (3)

comment:1 Changed 14 years ago by dmethvin

Can you attach a simple test case that demonstrates the problem, or post a link to one on your site?

comment:2 Changed 14 years ago by atlithorn

My apologies, please disregard. Not a jQuery bug.

comment:3 Changed 14 years ago by dmethvin

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.