Answer the question
In order to leave comments, you need to log in
The ajax script does not work, does not receive data from the handler, what should I do?
There is ajax code:
$('.add-to-cart').click(function(){
var id = $(this).attr("rel");
$.ajax({
type: 'POST',
url: '/functions/addtocart.php',
data: 'id='+id,
dataType: 'html',
cashe: false,
seccess: function(data){
loadcart();
}
});
});
function loadcart(){
$.ajax({
type: 'POST',
url: '/functions/loadcart.php',
dataType: 'html',
cashe: false,
seccess: function(data){
$('.cart-contents').html(data);
}
});
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question