Hi guys,
I'm working on a shopping cart and I'm having some difficulties with a concept.
Basicly, I remove two articles in a certain condition and it works perfectly.
My problem is that I want to redirect the user instantly if these two articles are removed from the cart.
When I enter the window.location, it is refreshing the page but it's not updating the cart from the ajax call.
So what I want to achieve is that after these two ajax calls, i want to be redirected but also, the ajax call should do their things in the delete_item.php
:)
I'm using jQuery inside a normal javascript file on a certain function.
function deleted(id, pozitie) {
var msg = 0;
$(document).ready(function(){
$('.' + id).each(function() {
$(this).remove();
$('.sm').remove();
ajaxpage("delete_item.php?id="+pozitie+"&ord="+ordrno,"error");
ajaxpage("delete_item.php?id="+(pozitie+1)+"&ord="+ordrno,"error");
window.location="http://mypage.com/offer";
msg = 1;
});
});