function CreateClone () {
$.post(URL, {websiteid: WebsiteID, recid: $(this).attr('recid'), pricing: $('#ClonePricing').prop('checked'), pres: $('#ClonePresentations').prop('checked'), advdetails: $('#CloneAdvancedDetails').prop('checked'), delivery: $('#CloneDelivery').prop('checked'), feeds: $('#CloneDelivery').prop('checked'), time: $.now() }, function (data) {
var response = $.parseHTML(data); var ErrorMessage = $(response).filter('#ErrorMessage').html(); var ReturnContent = $(response).filter('#ReturnContent').html();
if (typeof ErrorMessage != 'undefined' && ErrorMessage.length > 0) { alert(ErrorMessage); } else { LoadInventoryBySearch(); }
});
}
Whenever I make a call similar to this, the nested call LoadInventoryBySearch(Another AJAX call) is completely ignored. My ajax will literally not even see it. If I placed it inside of setTimeout for at least 100 ms it will call it. Why do I have to do that? I've seen in many places people are nesting ajax requests inside of other ajax requests with no delay. Synchronous is not turned on. Any one have any ideas? I have many calls like this, and it's very very aggravating to have to place setTimeout around all my other requests and properly separate them by time as the error will repeat if they're all setting a timeout for the same amount of time.
Edit: Just want to add that the need for these calls is for updating user data on the screen. If they add or delete information a part of the page needs to refresh.
Also: I have FireBug up, and Chrome Network tools. Both are not showing any other requests outside of the CreateClone function. Like I said completely ignoring it despite all conditions allowing it to do so.
This post has been edited by trevster344: 14 August 2014 - 12:55 PM

New Topic/Question
Reply


MultiQuote


|