0

I have a function that calls a php script to update cart items (cookie). When I have multiple items in the cart I use a loop that calls my function.

function updateCart(ur){
    $.ajax({
        url: ur,
        success: function(data){
            console.log(data);
        }
    });
}

I think this is firing too fast or something. When there is one item in the cart it works fine. When there are multiple items nothing updates but the function does get called.
Any help is greatly appreciated. Thank You

1
Contributor
1
Reply
11
Views
3 Years
Discussion Span
Last Post by ProfessorPC
0

I have fixed this by changing to the xmlhttprequest. I was able to set the last object to false.

xmlhttp.open("GET","ajax_info.txt",false)

This took care of it.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.